I am using 7.5.0.0 amqmdnet.dll and building my .net app using MQ.NET classes, however after deployment, if the target machine has 7.1.0.0 MQ client installed, the app throws can't find assembly
7.5.0.0 dll information, is IBM's MQ client version not backward client compatible?
System.IO.FileNotFoundException: Could not load file or assembly
'amqmdnet, Version=7.5.0.0, Culture=neutral,
or one of its dependencies. The
system cannot find the file specified.
I can't find any information related to this at the official page.
IBM 7.5 link
Does that need to be always the build version in the target computer? I assume if i use 7.1 dll, it will work with 7.1 greater versions too. When i referenced 7.1.0.0, i get this in the project file.
<Reference Include="amqmdnet, Version=7.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\IBM\7.1.0.0\amqmdnet.dll</HintPath>
</Reference>
Why is it having 7.5.0.0? any idea (although the version i have referenced is 7.1.0.0)?
The backward compatibility "issue" is not just limited to MQ, it's with all .NET assemblies. Compiling an application with one version of a .NET assembly and running it with a lower version of that .NET assembly is not supported, not just MQ but every .NET assembly. You have to use the same version of the assembly that the application was built with. If you have higher version of that assembly then you would require policy files to redirect the .NET CLR to load the higher version of that .NET assembly.
Related
I am getting the following error building my C# project.
Assembly "name_of_assembly" uses 'Microsoft.Synchronization,
Version=2.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
which has a higher version than referenced assembly
'Microsoft.Synchronization, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=89845dcd8080cc91'
I have made sure all my class libraries are targeting the same version of .NET framework which typically seems to be the problem.
I examined the installed programs and found I had version 1.0 and 2.1 of Microsoft Sync Framework installed. I uninstalled version 1 components. That fixed the problem.
Now my code builds fine.
There are several components for each version in installed programs. I uninstalled two of v1.0 but still have its Runtime component but code already builds fine.
If you only have v1 installed, uninstall it and install the correct version, version 2.1 is here.
As I implement Vonk FHIR Facade using the link, I've performed all steps successfully uptil this point and placed the resulting dlls in plugins directory.
Now when I start the Vonk server, it fails with following error:
Startup Failed: Could not load file or assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublishToken=xxxxxxxxxx' The system cannot find the file specified.
I've build my Vonk Facade project in .NET Core 2.1.
Any solution or workaround would be highly appreciated.
With the help of #Alexander Zuatke and Firely team, we found that Vonk server v2.0.0.0 still targets netcoreapp 2.0 internally.
So we have to target our development project i.e. Vonk Facade to .NET Core 2.0
I'm currently developing an app for a Microsoft Hololens.
To use the database libaries of the company I already ported the old .NET Framework libaries into .NET Core 2.0.
I used the Portability Check Tool issued by Microsoft to be sure that I was on the right track.
Apparently my idea worked that's why I included a new UWP App to run on my Hololens.
When I tried using my libary connection commands I encountered the following issue:
Assembly 'xy' with identity
'xy, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' uses 'System.Data.Common, Version=4.2.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher
version than referenced assembly 'System.Data.Common' with identity
'System.Data.Common, Version=4.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'
It seems that my newly ported libaries use a higher version of System.Data.Common than my Universal Windows project.
I am currently at a loss on how to have an equal version in both projects.
I already tried a bunch of packages from Nuget and also downgrading my libraries didn't help.
I have a .net standard 1.4 project which I am referencing via project reference from a .net 4.6.1 project.
When I run I get the following message:
System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Threading.Thread,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or
one of its dependencies. The system cannot find the file specified.'
I can work around this by referencing the nuget package for System.Threading.Thread version 4.3.0. But for some reason this is actually version 4.0.1.0 which then means I need a binding redirect.
Adding a binding redirect gets me past this issue and onto the next one. Which is:
System.IO.FileNotFoundException: 'Could not load file or assembly
'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
system cannot find the file specified.'
Do I need to manually add packages (and potentially binding redirects) for all of the dependencies of my .net standard packages? This doesn't seem to be what was sold. Whats the point of .net standard if I have to ship with all the assemblies it needs even through these are already included in the GAC in the .net framework I am targeting. I can't see how this can be sold as .net standard 1.4 is compatible with .net 4.6.1 if by compatible you mean as long as you don't use .net 4.6.1 BCL libraries.
The following issue seems to be related https://github.com/NuGet/Home/issues/4488
However I have tried the suggested work around there. Which is to add:
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
to the .net 4.6.1 project. I tried this and it made no difference.
UPDATE
After adding the following to my .net 4.6.1 project:
<PackageReference Include="Legacy2CPSWorkaround" Version="1.0.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
I now have System.IO.FileSystem in my output directory however its the wrong version. It's 4.0.2.0. Again I can resolve this using an binding redirect but I shouldn't need to.
I don't know where this 4.0.2.0 dll came from because it's not in my packages folder so it can't have come from nuget?
I'm trying to make Npgsql, the PostgreSQL provider for .NET, available for consumption by Xamarin users. Npgsql already supports the .NET Platform Standard (version 3), and the documentation on the standard contains the following sentence:
If a library targets .NET Platform Standard version 1.3, it can only run on .NET Framework 4.6 or later, .NET Core, Universal Windows Platform 10 (UWP), and Mono/Xamarin platforms.
I can successfully install the Npgsql nuget from my Xamarin.Android project. However, when I try to build I get the following error:
System.IO.FileNotFoundException: Could not load assembly 'System.Security.Cryptography.Algorithms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
Now, that packages (like many RC2 packages Npgsql depends on) has a lib/MonoAndroid10 directory containing . (also the same in ref), which seems to indicate that the package is supported on Mono.Android, but no DLL is necessary (since the logic is part of the framework). That's great, but the Xamarin.Android build process includes a ResolveAssemblies task, which walks the DLL dependency graph (this is the relevant code). Since Npgsql's netstandard13 DLL references System.Security.Cryptography.Algorthims.dll, this fails.
I'm confused that the nuget declares "it's all good", while the build process itself seems obviously incompatible with consuming netstandard13 dependencies.
Any ideas?