我已经跟踪了第三方程序集,但没有任何线索。这是错误=>编译为本机代码

/ Developer / MonoTouch / usr / bin / mtouch -sdkroot“/Applications/Xcode.app/Contents/Developer” -v --cache“/ Users / volgainfotech / Projects / ScrapBoom / Kiln / Scrapboom-Mongo-Stable / ScrapboomPhone / Scrapboom .iPhone / obj / Debug / mtouch-cache“--nomanifest --nosign -dev” /Users/volgainfotech/Projects/ScrapBoom/Kiln/Scrapboom-Mongo-Stable/ScrapboomPhone/Scrapboom.iPhone/bin/iPhone/Debug/ScrapboomiPhone .app“-r” /Users/volgainfotech/Projects/ScrapBoom/Kiln/Scrapboom-Mongo-Stable/ScrapboomPhone/Scrapboom.Core/bin/iPhone/Debug/ScrapboomCore.dll“-r” / Developer / MonoTouch / usr / lib /mono/2.1/System.dll“-r” /Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll“-r” /Developer/MonoTouch/usr/lib/mono/2.1/System.Core .dll“-r” /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll“-r” /Developer/MonoTouch/usr/lib/mono/2.1/MonoTouch.Dialog-1.dll“-r” /Users/volgainfotech/Projects/ScrapBoom/Kiln/Scrapboom-Mongo-Stable/ScrapboomPhone/Assets/Emgu.CV.MonoTouch.dll“-r” / Users / volgainfotech / Projects / ScrapBoom / Kiln / Scrapboom- Mongo-Stable / ScrapboomPhone / Assets / Emgu.Util.MonoTouch.dll“-r” /Users/volgainfotech/Projects/ScrapBoom/Kiln/Scrapboom-Mongo-Stable/ScrapboomPhone/Assets/FlurryAnalytics.dll“-debug -profiling-links -sdk“6.1” -targetver“3.1” --sgen --abi = armv7“--linkskip = system.web”“/Users/volgainfotech/Projects/ScrapBoom/Kiln/Scrapboom-Mongo-Stable/ScrapboomPhone/Scrapboom.iPhone /bin/iPhone/Debug/ScrapboomiPhone.exe”
使用框架的MonoTouch Business版本6.4.1:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
仅将程序集/Users/volgainfotech/Projects/ScrapBoom/Kiln/Scrapboom-Mongo-Stable/ScrapboomPhone/Scrapboom.iPhone/bin/iPhone/Debug/ScrapboomiPhone.exe的SDK链接到/ Users / volgainfotech / Projects / ScrapBoom / Kiln / Scrapboom -Mongo-Stable / ScrapboomPhone / Scrapboom.iPhone / obj / Debug / mtouch-cache / PreBuild
错误MT2002:无法解析程序集:“System.Web,版本= 4.0.0.0,区域性=中性,PublicKeyToken = b03f5f7f11d50a3a”

最佳答案

该错误只能在构建时发生,而不是在运行应用程序时发生。

这意味着您的依赖项之一(例如,第三方二进制程序集)具有对System.Web.dll的引用。该程序集未随Xamarin.iOS(任何版本)一起提供。

由于以下原因,模拟器上不会发生该错误:

  • ,默认情况下,不使用链接器(它将解决所有问题);
  • 使用的是即时(JIT)编译器,因此只有在尝试执行需要它的代码时,它才会命中丢失的程序集(或成员)。
  • 在设备上运行所需的提前(AOT)编译器需要预编译所有内容,即,在构建时(而不是运行时)会检测到所有缺少的内容
  • 关于ios - MT2002:无法解决程序集:System.Web,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/18148147/

    10-10 06:18