question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding references that already exist for Xamarin android projects

See original GitHub issue

Description

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

  1. Create New solution
  2. Add xamarin csharp android project
  3. Add paket.references and paket.dependencies with “Hopac”
  4. paket install
  5. 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:open
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SpiegelSoftcommented, Oct 21, 2017

I can confirm that this issue is here for Visual Studio 2017 on Windows 10.

0reactions
7sharp9commented, Sep 28, 2017
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found