Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple assemblies with equivalent identity. .NETFramework Facades

Tags:

c#

.net

On the same code branch we are successfully building on one machine, but on another we get this:

Error Multiple assemblies with equivalent identity have been 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'. Remove one of the duplicate references.

How can we resolve?

like image 521
Daniel Avatar asked Nov 24 '16 14:11

Daniel


1 Answers

Made the following change to .csproj, which did the trick:

<PackageReference Include="System.Reflection.Emit">
   <Version>4.3.0</Version>
   <ExcludeAssets>All</ExcludeAssets>
   <IncludeAssets>none</IncludeAssets>
</PackageReference>
like image 84
1iveowl Avatar answered Oct 13 '22 00:10

1iveowl