我已经跟踪了第三方程序集但没有任何线索。这是错误=>编译为本机代码
/ 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 / Scrapbo om-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 /斌/ iPhone /调试/ ScrapboomiPhone.exe” 使用框架的MonoTouch Business版本6.4.1:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk 将SDK仅用于汇编/Users/volgainfotech/Projects/ScrapBoom/Kiln/Scrapboom-Mongo-Stable/ScrapboomPhone/Scrapboom.iPhone/bin/iPhone/Debug/ScrapboomiPhone.exe链接到/ Users / volgainfotech / Projects / ScrapBoom / Kiln / Scrapboom -Mongo-稳定/ ScrapboomPhone / Scrapboom.iPhone / OBJ /调试/ mTouch触摸缓存/预生成 错误MT2002:无法解析程序集:'System.Web,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a'
答案 0 :(得分:4)
该错误只能在构建时发生,而不是在正在运行应用时发生。
这意味着您的某个依赖项(例如第三方二进制程序集)引用了System.Web.dll
。该程序集未附带(任何版本的)Xamarin.iOS。
模拟器上不会发生错误,因为:
默认情况下,不使用链接器(解决所有问题);
它正在使用Just-In-Time(JIT)编译器,因此只有在尝试执行需要它的代码时才会遇到缺少的程序集(或成员);
在设备上运行所需的Ahead-Of-Time(AOT)编译器需要预编译所有内容,即在构建时(而不是运行时)检测到任何遗漏的内容