VS 2015 Several assemblies with equivalent identities were imported.

One of my design decisions works fine on the system where I installed VS 2013. But when I open the same project on a different system in VS 2015, it gives this basic error:

Error CS1703 Several assemblies with the equivalent identifier were imported: 'D: \ src \ packages \ Microsoft.Bcl.1.1.10 \ lib \ net40 \ System.IO.dll' and 'C: \ Program Files (x86) \ Link

Builds \ Microsoft \ Framework.NETFramework \ v4.5 \ Facades \ System.IO.dll. Delete one of the duplicate links.

The project file refers to the package file, but when it opens in VS, it is automatically converted to the library library path. I cannot remove the BCL package because it depends on other packages.

Edit:

Why is the solution built perfectly in one version of Visual Studio, but it gives an error of several assemblies in another version?

Is there any way to solve this problem so that it works in different versions?

I also have this problem, however its solution builds beautifully on VS 2017 but cannot build VS 2015.

+8
c # visual-studio-2015 assemblies
source share
3 answers

This error occurs when an unpromising library references a portable library, and then the assembly system adds facade assemblies. [one]

Try removing the following links:

 <Reference Include="System.IO"> <HintPath>..\packages\System.IO.4.0.10-beta-22516\lib\net45\System.IO.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="System.Text.Encoding"> <HintPath>..\packages\System.Text.Encoding.4.0.10-beta-22516\lib\net45\System.Text.Encoding.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="System.Threading.Tasks"> <HintPath>..\packages\System.Threading.Tasks.4.0.10-beta-22516\lib\net45\System.Threading.Tasks.dll</HintPath> <Private>True</Private> </Reference> 
+1
source share

This error usually appears when the NuGet package has invalid dependencies, but it is not, since everything works well in other versions of Visual Studio.

First, you can force reinstall all NuGet packages. This can be done by opening the Package Manager Console and typing:

 Update-Package -reinstall 

The second most common solution to this problem is to ensure that Visual Studio is updated to the latest version (in this case, this is an update for Visual Studio 2015 Update 3). If this does not help, try reinstalling Visual Studio completely on this device. Finally, you can try installing Visual Studio 2015 on another computer to see if this is really a problem with this version or a PC problem.

+1
source share

If you use a common assembly for several projects and want them to use the same version, I recommend installing this version in the global assembly cache.

This version from the GAC will then be available from the links dialog.

Use the same dialog for links between assemblies.

+1
source share

All Articles