为什么添加Moq NuGet软件包会产生MT0109警告

时间:2019-04-27 17:13:42

标签: xamarin nuget moq .net-standard

我已经开始研究香草Xamarin.Forms项目,并且在将Moq添加到Forms项目之后,尝试构建iOS项目时收到以下警告。

  

MTOUCH:警告MT0109:程序集'System.Diagnostics.TraceSource.dll'是从与提供的路径不同的路径加载的(提供的路径:/Users/{me}/.nuget/packages/system.diagnostics.tracesource /4.3.0/runtimes/win/lib/netstandard1.3/System.Diagnostics.TraceSource.dll,实际路径:/Library/Frameworks/Xamarin.iOS.framework/Versions/12.8.0.0/lib/mono/Xamarin.iOS /Facades/System.Diagnostics.TraceSource.dll)。

仅在构建iOS项目时,添加NuGet包本身时没有警告报告。实际上,在构建时有两个警告,但我设法解决了一个。

我尝试了Moq的各种版本(4.7.x,4.8.x,4.9.x,4.10.x)。同样的问题。

我对Google进行了广泛的搜索,但并没有太大的帮助。我遇到了以下线程,这些线程提供了一些见解,但实际上并没有帮助解决问题:

How do I get rid of these compiler warnings about wrong paths

https://developercommunity.visualstudio.com/content/problem/121551/xamarin-ios-build-assembly-path-mismatch.html

https://github.com/dotnet/standard/issues/481

问题:如何解决此警告? Moq是否存在问题,需要重新提交错误?


我的环境:

  • VS for Mac 2019 V8.0.4(内部版本0)
  • Xamarin.Forms项目使用 Xamarin.Forms 3.6.0.x,Xamarin.Essentials 1.0.1,Moq(导致 警告),并且目标框架是.NET Standard 2.0。

0 个答案:

没有答案
相关问题