I'm attempting to build a Xamarin iOS app using .NET Standard 2.0 dependencies. One of these dependencies includes a reference to the System.Reflection.Emit 4.3.0 NuGet package.
This causes a build error when the iOS app is built, as this dll conflicts with the reference facade for System.Reflection.Emit:
CSC : error CS1703: Multiple assemblies with equivalent identity have been imported: 'C:\Users\ndesl.nuget\packages\system.reflection.emit\4.3.0\ref\netstandard1.1\System.Reflection.Emit.dll' and 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.iOS\v1.0\Facades\System.Reflection.Emit.dll'. Remove one of the duplicate references.
Anyone knows how to deal with this? Shouldn't those assemblies be recognised as 2 versions of the same assembly?
Attempting to specify a binding redirect in app.config doesn't help. I'm using the latest versions of Xamarin and VS2017.
A minimal project exhibiting the issue can be found here: https://github.com/nicodeslandes/ReflectionEmitBuildIssue