我应该使用位于Mono

我应该使用位于Mono

本文介绍了CS1703:在Xamarin.Droid中,我应该使用位于Mono.Framework还是System.Runtime中的.Net Standard windowsruntime.dll?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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)

推荐答案

就在本周.不知道是什么原因造成的.

Ran into this just this week. No idea what change caused it.

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

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.

这篇关于CS1703:在Xamarin.Droid中,我应该使用位于Mono.Framework还是System.Runtime中的.Net Standard windowsruntime.dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 14:38