Error CS1703: Multiple assemblies with equivalent identity have been imported - Xamarin + VSTS

Quality Catalyst picture Quality Catalyst · Sep 23, 2016 · Viewed 39.2k times · Source

I upgraded to the latest Xamarin for Visual Studio 2015 (Community Edition), recompiled my projects, checked in a few small code changes and my VSTS build server fails with this error message:

[error]CSC(0,0): Error CS1703: Multiple assemblies with equivalent identity have been imported: 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll' and 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll'. Remove one of the duplicate references.

Internet searches return nearly no details about this issue in general and no valuable information at all in the context of VSTS and Xamarin.

The only code change that I consider to be relevant to the issue was done by Visual Studio in the project file:

enter image description here

I only develop for Android, am on Xamarin 4.2 and use the JDK 8 u101.

Any idea how to solve this issue?

Answer

DriLLFreAK100 picture DriLLFreAK100 · Sep 25, 2016

I have just solved the issue. Try removing the mscorlib.dll from the References Folder inside your solution itself. Refer to the below highlighted folder (Reference Folder). It seems that Xamarin will include the mscorlib.dll by default during its build. Hope it helps :)

enter image description here