CS1703:在 Xamarin.Droid 中,我应该使用位于 Mono.Framework 还是 System.Runtime 中的 .Net Standard windowsruntime.dll? [英] CS1703: In Xamarin.Droid, should I use the .Net Standard windowsruntime.dll located in Mono.Framework, or System.Runtime?

查看:23
本文介绍了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>....packagesSystem.Runtime.InteropServices.WindowsRuntime.4.0.1lib
etstandard1.3System.Runtime.InteropServices.WindowsRuntime.dll</HintPath-->
    <Private>True</Private>
</Reference>

重复问题此处,顺便说一句.

Duplicate question here, btw.

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

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆