I am going mad here, and I am hoping that it\'s something that I\'ve simply overlooked.
I am experiencing intermittent FileLoadExceptions
, which are showing
Projects with same nuget package refrencing different version of assembly
This is a known issue when we build a .NET Framework 4.6.x app.
That because:
This is due to the injected support for NETStandard 2.0. We inject new assemblies into NET 4.6.1 and later desktop projects in order to add support for netstandard2.0. We do this in targets now instead of packages because its no longer a requirement to reference a package to build a netstandard library. This injection happens whenever we see a netstandard1.5 or greater library referenced (see dotnet/sdk#1386).
To resolve this issue, we could add binding redirect to those reference to use standard references to System.IO.Compression
and not bring in any Nuget package for System.IO.Compression
. If you still want to use the reference System.IO.Compression
from nuget package, you can delete System.IO.Compression
from the MSBuild tooling.
Check more detail info from the Github:
https://github.com/dotnet/corefx/issues/25773
Hope this helps.