Adding references that already exist for Xamarin android projects
See original GitHub issueDescription
Paket adds transient references for xamarin that seem to be already added (possibly due to some xamarin project imports)
Not sure if this is actually pakets fault, but it does mean it doesn’t work nice with xamarin. I haven’t tested if nuget fails similarily.
Repro steps
- Create New solution
- Add xamarin csharp android project
- Add paket.references and paket.dependencies with “Hopac”
- paket install
- build in visual studio 2017
See. https://github.com/btrepp/xamarinpakethopac
Expected behavior
No build errors
Actual behavior
Severity Code Description Project File Line Suppression State
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Users\Beau\Code\xamarinpaket\packages\System.Xml.XDocument\lib\netstandard1.3\System.Xml.XDocument.dll' and 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Xml.XDocument.dll'. Remove one of the duplicate references. xamarinpaket C:\Users\Beau\Code\xamarinpaket\xamarinpaket\CSC 1 Active
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Users\Beau\Code\xamarinpaket\packages\System.Threading.Tasks.Parallel\lib\netstandard1.3\System.Threading.Tasks.Parallel.dll' and 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Threading.Tasks.Parallel.dll'. Remove one of the duplicate references. xamarinpaket C:\Users\Beau\Code\xamarinpaket\xamarinpaket\CSC 1 Active
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Users\Beau\Code\xamarinpaket\packages\System.Threading\lib\netstandard1.3\System.Threading.dll' and 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Threading.dll'. Remove one of the duplicate references. xamarinpaket C:\Users\Beau\Code\xamarinpaket\xamarinpaket\CSC 1 Active
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Users\Beau\Code\xamarinpaket\packages\System.Runtime.Numerics\lib\netstandard1.3\System.Runtime.Numerics.dll' and 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Runtime.Numerics.dll'. Remove one of the duplicate references. xamarinpaket C:\Users\Beau\Code\xamarinpaket\xamarinpaket\CSC 1 Active
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Users\Beau\Code\xamarinpaket\packages\System.Reflection.Emit.Lightweight\lib\netstandard1.3\System.Reflection.Emit.Lightweight.dll' and 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Reflection.Emit.Lightweight.dll'. Remove one of the duplicate references. xamarinpaket C:\Users\Beau\Code\xamarinpaket\xamarinpaket\CSC 1 Active
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Users\Beau\Code\xamarinpaket\packages\System.Reflection.Emit.ILGeneration\lib\netstandard1.3\System.Reflection.Emit.ILGeneration.dll' and 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Reflection.Emit.ILGeneration.dll'. Remove one of the duplicate references. xamarinpaket C:\Users\Beau\Code\xamarinpaket\xamarinpaket\CSC 1 Active
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Users\Beau\Code\xamarinpaket\packages\System.Reflection.Emit\lib\netstandard1.3\System.Reflection.Emit.dll' and 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Reflection.Emit.dll'. Remove one of the duplicate references. xamarinpaket C:\Users\Beau\Code\xamarinpaket\xamarinpaket\CSC 1 Active
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Users\Beau\Code\xamarinpaket\packages\System.ObjectModel\lib\netstandard1.3\System.ObjectModel.dll' and 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.ObjectModel.dll'. Remove one of the duplicate references. xamarinpaket C:\Users\Beau\Code\xamarinpaket\xamarinpaket\CSC 1 Active
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Users\Beau\Code\xamarinpaket\packages\System.Linq.Queryable\lib\netstandard1.3\System.Linq.Queryable.dll' and 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Linq.Queryable.dll'. Remove one of the duplicate references. xamarinpaket C:\Users\Beau\Code\xamarinpaket\xamarinpaket\CSC 1 Active
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Users\Beau\Code\xamarinpaket\packages\System.Collections.Concurrent\lib\netstandard1.3\System.Collections.Concurrent.dll' and 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Collections.Concurrent.dll'. Remove one of the duplicate references. xamarinpaket C:\Users\Beau\Code\xamarinpaket\xamarinpaket\CSC 1 Active
Known workarounds
Removing the references added seems to result in a successful build, though paket adds them back on ‘paket install’
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Add project references in Xamarin's Shared Project
Add the reference to the Android / iOS project and it will be automatically be accessible from the Shared Project. Share.
Read more >No reference to Xamarin.Android.Support libraries in VS ...
I noticed that the references to Xamarin.Android.Support libraries are not added automatically in Nuget when the solution is created for the ...
Read more >Xamarin.Forms - Add Android Project In An Existing Project
In this article, you will learn how to add an Android Project in an existing project in Xamarin.Forms.
Read more >Adding references that already exist for Xamarin android projects
Description. Paket adds transient references for xamarin that seem to be already added (possibly due to some xamarin project imports).
Read more >needs fix from xamarin -- [vsfeedback] Nuget get error "This ...
Forms via NuGet however the reference was already added after I added a reference to another project that already had Xamarin.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can confirm that this issue is here for Visual Studio 2017 on Windows 10.
I can confirm it built fine for me: https://gist.github.com/7sharp9/b2f1cc204d17838d96537e9fff8812fc