3

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

/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 -linksdkonly -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/平台/iPhoneOS。platform/Developer/SDKs/iPhoneOS6.1.sdk 链接 SDK 仅用于组装 /Users/volgainfotech/Projects/ScrapBoom/Kiln/Scrapboom-Mongo-Stable/ScrapboomPhone/Scrapboom.iPhone/bin/iPhone/Debug/ScrapboomiPhone.exe 到 /用户/volgainfotech/Projects/ScrapBoom/Kiln/Scrapboom-Mongo-Stable/ScrapboomPhone/Scrapboom.iPhone/obj/Debug/mtouch-cache/PreBuild 错误 MT2002:无法解析程序集:'System.Web,版本 = 4.0.0.0,文化=中立,PublicKeyToken=b03f5f7f11d50a3a'版本=4.0.0.0,文化=中性,PublicKeyToken=b03f5f7f11d50a3a'版本=4.0.0.0,文化=中性,PublicKeyToken=b03f5f7f11d50a3a'

4

1 回答 1

4

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

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

该错误不会在模拟器上发生,因为:

  • 默认情况下,它不使用链接器(它可以解决所有问题);

  • 它使用即时 (JIT) 编译器,因此只有在尝试执行需要它的代码时才会命中丢失的程序集(或成员);

  • 在设备上运行所需的 Ahead-Of-Time (AOT) 编译器需要预编译所有内容,即在构建时(而不是运行时)将检测到任何缺失

于 2013-08-09T14:18:23.167 回答