简体   繁体   English

无法在 Xamarin.iOS 上 AOT Microsoft.CSharp.dll 的程序集

[英]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.

相关问题 Xamarin iOS 无法 AOT 程序集 Microsoft.EntityFrameworkCore.Migrations.Migration - Xamarin iOS Could not AOT the assembly Microsoft.EntityFrameworkCore.Migrations.Migration Xamarin Forms - iOS - 错误 MT3001:无法 AOT 程序集 - Xamarin Forms - iOS - error MT3001: Could not AOT the assembly 找不到框架xamarin.ios的程序集 - Assembly not found for framework xamarin.ios 无法自动运行程序集System.ComponentModel.DataAnnotations.dll - Could not AOT the assembly System.ComponentModel.DataAnnotations.dll Xamarin Forms Android:获取 XA3001:无法 AOT 程序集 - Xamarin Forms Android: Getting XA3001: Could not AOT the assembly 将iOS静态库绑定到Xamarin.iOS并使用dll - Binding iOS Static Library to Xamarin.iOS and using the dll Xamarin.Form 无法加载 Xamarin.iOS - Xamarin.Form could not load Xamarin.iOS Xamarin.iOS-无法安装软件包“ System.Net.Http 4.0.0”,该软件包不包含任何程序集引用 - Xamarin.iOS - Could not install package 'System.Net.Http 4.0.0' the package does not contain any assembly references Xamarin.iOS 次构建,最显着的是链接和 AOT 编译,在调试配置中耗时超过 2 分钟 - Xamarin.iOS builds, most notably Linking and AOT-compilation, take over 2 minutes in debug configurations 将 Microsoft.AppCenter 与 Xamarin.iOS 结合使用时出错 - Getting an error while using Microsoft.AppCenter with Xamarin.iOS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM