简体   繁体   中英

Attempting to JIT compile method '(wrapper delegate-invoke) - System.Net.HttpWebRequest

After migration to Unified API (Xamarin) and upgrading MvvmCross to 3.5 (and retargeting PCL projects to profile 259 .net 4.5) I get this error while trying to run the app on iPhone:

Attempting to JIT compile method '(wrapper delegate-invoke) :invoke_callvirt_void_HttpWebRequest_bool (System.Net.HttpWebRequest,bool)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.

I disabled the linker. It doesn't help. Anyone?

确保在项目的iOS构建选项(高级页面)中选中了“启用通用值类型共享”。

The problem was that I used Microsoft.Http nuget which referenced System.Net.Http.dll. This dll is not the same as Mono System.Net.Http.dll. I removed the nuget and used Mono dll instead (with ModernHttpClient).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM