我正在尝试构建this Android Xamarin project,并且遇到了编译时错误:

./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)

最佳答案

就在这个星期。不知道是什么原因引起的。

对我有用的是在.csproj参考中注释掉HintPath:

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


重复的问题here,顺便说一句。

10-06 12:23