Projects with same nuget package referencing different version of assembly

前端 未结 1 1288
粉色の甜心
粉色の甜心 2021-01-22 02:46

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

相关标签:
1条回答
  • 2021-01-22 03:29

    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.

    0 讨论(0)
提交回复
热议问题