title: Xamarin.iOS project: CS1703: Multiple assemblies with equivalent identity have been imported
body: <p>I've got a cross platform (iOS and Android) Xamarin solution using .NET Standard 2.0.  The solution is being built by Visual Studio 2017 (I've tried both the current and preview versions).  The Forms and Android projects build fine.  However, the iOS fails to build, with the following error:</p>
  
  <p>1>CSC : error CS1703: Multiple assemblies with equivalent identity have been imported: 'C:\Users\newuser.nuget\packages\system.reflection.emit\4.3.0\ref\netstandard1.1\System.Reflection.Emit.dll' and 'C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.iOS\v1.0\Facades\System.Reflection.Emit.dll'. Remove one of the duplicate references.</p>
  
  <p>I've tried many work arounds as described here:</p>
  
  <p><a href="https://oren.codes/2017/04/23/using-xamarin-forms-with-net-standard-vs-2017-edition/" rel="noreferrer">oren.codes</a></p>
  
  <p><a href="https://www.hanselman.com/blog/ReferencingNETStandardAssembliesFromBothNETCoreAndNETFramework.aspx" rel="noreferrer">www.hanselman.com</a></p>
  
  <p><a href="https://github.com/NuGet/Home/issues/4581" rel="noreferrer">github.com/NuGet</a></p>
  
  <p>Unfortunately none of these suggestions work.  I have also tried to add the System.Reflection.Emit nuget package directly to the Forms and/or to the iOS projects directly.  This doesn't work either. Note that originally, the The System.Reflection.Emit package wasn't referenced directly by anything in the solution.  It is being pulled in by the following nuget packages which are being explicitly referenced:</p>
  
  <ul>
  <li>Acr.DeviceInfo (5.0.5)</li>
  <li>akavache (6.0.0-alpha0038) </li>
  <li>AutoMapper (6.2.2)</li>
  <li>Microsoft.Identity.Client (1.1.1-preview0040) </li>
  <li>Newtonsoft.Json (10.0.3)</li>
  </ul>
  
  <p>Finally, I have tried the update-package -reinstall command in the package console to reinstall all packages for the iOS project.  This doesn't work either.</p>
  
  <p>-- update</p>
  
  <p>Just to make this clear, neither the Xamarin Forms or the Xamarin iOS project directly reference System.Reflection.Emit.  That package is being pulled in as a dependency of other nuget packages, just from packages that are installed into the Xamarin Forms project.  I have confirmed all of the dependencies that are referenced by Nuget, are using the same version.   See these screenshots:</p>
  
  <p><a href="https://i.stack.imgur.com/teirl.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/teirl.jpg" alt="Referenced Emit dependencies from Visual Studio"></a>
  <a href="https://i.stack.imgur.com/moGra.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/moGra.jpg" alt="Expanded referenced Emit dependencies"></a></p>
  
  <p>It seems to me that the problem (as the error says) is that there is an old version of System.Reflection.Emit that was installed by Visual Studio.  However, I can't find a way of ignoring it and using the version of System.Reflection.Emit instead.  As I've said above, I have tried to use a project.json file in the Xamarin.iOS project, and manually ignoring, but this doesn't work.</p>
  
  <p>Does anyone else have any ideas?</p>
  
  <p>As an aside, I notice that this bug is still open for Xamarin.  </p>
  
  <p><a href="https://bugzilla.xamarin.com/show_bug.cgi?id=54139" rel="noreferrer">Xamarin Bugs</a></p>