[英]Could not AOT the assembly for Microsoft.CSharp.dll on Xamarin.iOS
When I try to build my Xamarin iOS project, I get the error : " Could not AOT the assembly '/Users/xxx/Library/Caches/Xamarin/mtbs/builds/myApp.iOS/hugeNumbers/obj/iPhone/Debug/mtouch-cache/3-Build/Microsoft.CSharp.dll' "当我尝试构建我的 Xamarin iOS 项目时,出现错误:“无法 AOT 程序集 '/Users/xxx/Library/Caches/Xamarin/mtbs/builds/myApp.iOS/hugeNumbers/obj/iPhone/Debug/mtouch -cache/3-Build/Microsoft.CSharp.dll'"
I've found in some other posts this is due to the package Newtonsoft.Json, but it is supposed to be fixed since a while ago.我在其他一些帖子中发现这是由于 Newtonsoft.Json 包造成的,但它应该是在不久前修复的。
I am trying to build my project on Visual Studio 2019 on Windows, synchronized with my Mac in order to launch on iPhone.我正在尝试在 Windows 上的 Visual Studio 2019 上构建我的项目,与我的 Mac 同步以便在 iPhone 上启动。
Any help please ?请问有什么帮助吗?
Thanks to Lex Li, here are the steps that made it works for me :感谢 Lex Li,以下是使其对我有用的步骤:
1- Download from here a installer for AOT (available for Visual Studio 2019 and Visual Studio for Mac 8.0 1- 从这里下载 AOT 安装程序(适用于 Visual Studio 2019 和 Visual Studio for Mac 8.0
2- Launch the installer and follow the steps 2-启动安装程序并按照步骤操作
3- On your project Xamarin.iOS (myApp.iOS), right click > settings 3- 在您的项目 Xamarin.iOS (myApp.iOS) 上,右键单击 > 设置
4- Go to Build iOS, and at the bottom of the page, add " --interpreter " in the section Additional mtouch arguments 4- 转到构建 iOS,并在页面底部的附加 mtouch 参数部分添加“--interpreter”
5- Build again, and it should work. 5-再次构建,它应该可以工作。
Try this : Delete the app on phone or emulator.试试这个:删除手机或模拟器上的应用程序。 Clean and rebuild solutions.
清洁和重建解决方案。 The redeploy again.
再次部署。
<MtouchExtraArgs>--interpreter=FSharp.Core ...</MtouchExtraArgs>
<MtouchInterpreter>-all</MtouchInterpreter>
and和
<MtouchExtraArgs>--linkskip=FSharp.Core ...</MtouchExtraArgs>
both work for me in https://github.com/xperiandri/Elmish.Uno/两者都在https://github.com/xperiandri/Elmish.Uno/为我工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.