Multiple Assemblies with Equivalent Identity .. NETFramework Facades

In the same code branch, we successfully build one machine, and on the other we get the following:

Error. Several instances with an equivalent identifier were imported: '... \ src \ packages \ System.Xml.ReaderWriter.4.3.0 \ lib \ net46 \ System.Xml.ReaderWriter.dll' and 'C: \ Program Files (x86) \ Reference assemblies \ Microsoft \ Framework.NETFramework \ v4.6.2 \ Facades \ System.Xml.ReaderWriter.dll '. Delete one of the duplicate links.

How can we decide?

+7
source share
8 answers

I eventually resolved this by upgrading Visual Studio to the latest version

+5
source

Using MSBuild 15 solves the problem. MSBuild 15 is part of the .NET Core SDK or can be downloaded using the Build Tools for Visual Studio 2017 .

+4
source

I suspect that you have both a direct link (via the GAC, and a file system via Browse ...) dll and the Nuget package in your project.

Better try uninstalling the Nuget package, and then check your links and remove any remaining links to System.Xml.ReaderWriter.dll , and then set the link to Nuget again.

UPDATE

For reference, a similar error occurred during System.Threading when the EntityFramework package was renamed . Perhaps one of your packages has a newer version or has a renamed namespace? Or maybe you have incompatible versions of the .NET Standard?

+1
source

Solve the "Multiple Builds" problem by removing Xamarin from the computer and Visual Studio 15.

Following this instruction: https://developer.xamarin.com/guides/cross-platform/getting_started/visual_studio_with_xamarin/troubleshooting/uninstall-xamarinvs/

My problem occurred when upgrading asp.net nuget packages from version 1.0.0 to 1.1.0.

+1
source

See https://github.com/dotnet/corefx/issues/14050.

This explains that in v4.3.0 of the nuget package, the use of the VS 2015 build tools, update 3 or later, is required.

If you cannot upgrade, downgrade the package to v4.0.11.

+1
source

In case someone is looking for another answer. May occur (6/6/2018) due to the ambiguity of reinstalling the package between the respective NetStandard and .NET Framework namespaces.

The problem led to the upgrade of the third-party NetStandard package and required / installed the dependency System.Net.NetworkInformation (I believe v4.3.0). Honestly, before this package everything worked fine, so I manually removed the dependency from CSPROJ and package.config of this main solution was added.

It is not clean, but it demonstrates the problem of NuGet or MSBuild, not admitting that they are in fact different assemblies and thus are considered duplicate links.

0
source

The following changes were made to .csproj, which helped:

 <PackageReference Include="System.Reflection.Emit"> <Version>4.3.0</Version> <ExcludeAssets>All</ExcludeAssets> <IncludeAssets>none</IncludeAssets> </PackageReference> 
0
source

Delete the dll in "C: \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.6.2 \ Facades \ System.Xml.ReaderWriter.dll". and create your code.

Add it back after build successfully.

0
source

Source: https://habr.com/ru/post/1012635/


All Articles