1
votes

After adding the Package PureSocketCluster version 3.1.0 to my Xamarin project, I get the following error when compiling:

.../Projects/HelloWorld/HelloWorld.iOS/CSC: Error CS1703: 
Multiple assemblies with equivalent identity have been imported:    '.../.nuget/packages/system.reflection.emit/4.3.0/ref/netstandard1.1/System.Reflection.Emit.dll'
and
'/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Facades/System.Reflection.Emit.dll'. 
Remove one of the duplicate references. (CS1703) (HelloWorld.iOS)

During the installation, I observed the following warnings:

Detected package downgrade: Xamarin.Forms from 3.4.0.1008975 to 3.1.0.697729. Reference the package directly from the project to select a different version. 
 HelloWorld.iOS (>= 1.0.0) -> HelloWorld (>= 1.0.0) -> Xamarin.Forms (>= 3.4.0.1008975) 
 HelloWorld.iOS (>= 1.0.0) -> Xamarin.Forms (>= 3.1.0.697729)

It's a very basic Hello World project, I just wanted to check if the communication with my socketcluster based websocket works in general.

enter image description here

I am using Visual Studio 2017 for Mac 7.6.11. I'm fairly new to VS, so please don't kill me, if I made a stupid beginner mistake.

1

1 Answers

1
votes

The way to resolve the issue is to add this to the iOS project file.

<PackageReference Include="System.Reflection.Emit">
  <Version>4.3.0</Version>
  <ExcludeAssets>all</ExcludeAssets>
</PackageReference>

Of course you need to make sure the nuget package has been added to the iOS package first. Here is a similar issue that you can refer.