问题
I'm trying to build this Android Xamarin project, and am getting the compile time error:
./ResilientServices/ResilientServices.Droid/CSC:
Error CS1703: Multiple assemblies with equivalent identity have been imported:
./ResilientServices/packages/System.Runtime.InteropServices.WindowsRuntime.4.0.1/lib/netstandard1.3/System.Runtime.InteropServices.WindowsRuntime.dll'
and
./Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/Facades/System.Runtime.InteropServices.WindowsRuntime.dll'.
Remove one of the duplicate references. (CS1703) (ResilientServices.Droid)
回答1:
Ran into this just this week. No idea what change caused it.
What worked for me was commenting out the HintPath in the .csproj Reference:
<Reference Include="System.Runtime.InteropServices.WindowsRuntime">
<!--HintPath>..\..\packages\System.Runtime.InteropServices.WindowsRuntime.4.0.1\lib\netstandard1.3\System.Runtime.InteropServices.WindowsRuntime.dll</HintPath-->
<Private>True</Private>
</Reference>
Duplicate question here, btw.
来源:https://stackoverflow.com/questions/45862676/cs1703-in-xamarin-droid-should-i-use-the-net-standard-windowsruntime-dll-loca