【发布时间】:2025-12-25 01:00:07
【问题描述】:
您可以在下面看到错误。
System.Runtime.InteropServices.WindowsRuntime
我的项目包中安装了一个版本,而 Mono 框架需要另一个版本。我觉得 Mono 框架应该是赢家。我的 iOS 版本不会发生此错误。
我将如何告诉 Visual Studio 社区 (Mac) 不要引用有问题的 dll?
/myproject/path/MyApp.Droid/CSC:
Error CS1703: Multiple assemblies with equivalent identity have been imported:
'/myproject/path/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) (MyApp.Droid)
【问题讨论】:
-
从
System.Runtime.InteropServices.WindowsRuntime4.0.1 升级到 4.3.0 可以消除此构建错误。以后如何避免这种行为?