【问题标题】:Could not AOT the assembly for Microsoft.CSharp.dll on Xamarin.iOS无法在 Xamarin.iOS 上 AOT Microsoft.CSharp.dll 的程序集
【发布时间】:2019-10-25 22:11:00
【问题描述】:

当我尝试构建我的 Xamarin iOS 项目时,我收到错误消息: " 无法 AOT 程序集 '/Users/xxx/Library/Caches/Xamarin/mtbs/builds/myApp.iOS/hugeNumbers/obj/iPhone/Debug/mtouch-cache/3-Build/Microsoft.CSharp.dll' "

我在其他一些帖子中发现这是由于包 Newtonsoft.Json 造成的,但它应该是不久前修复的。

我正在尝试在 Windows 上的 Visual Studio 2019 上构建我的项目,并与我的 Mac 同步以便在 iPhone 上启动。

有什么帮助吗?

【问题讨论】:

  • 谢谢,我正在看这个,然后我会回来。
  • 谢谢,它正在工作!现在我得到另一个问题“条件'klass'未满足”,但我将为此开始另一个问题。再次感谢您!

标签: xamarin xamarin.forms xamarin.ios .net-assembly


【解决方案1】:

感谢 Lex Li,以下是使它对我有用的步骤:

1- 从 here 下载 AOT 安装程序(适用于 Visual Studio 2019 和 Visual Studio for Mac 8.0

2- 启动安装程序并按照步骤操作

3- 在您的项目 Xamarin.iOS (myApp.iOS) 上,右键单击 > 设置

4- 转到 Build iOS,在页面底部的 Additional mtouch arguments 部分添加“--interpreter”

5- 再次构建,它应该可以工作。

【讨论】:

  • 这在 Visual Studio 16.4.5 中不起作用。我收到“安装错误:System.InvalidOperationException:安装 Microsoft.VisualStudio.Android.DeviceManager 失败。扩展的版本低于 Visual Studio 所需的版本。请改为从 Visual Studio 安装程序安装扩展。”
【解决方案2】:

试试这个: 删除手机或模拟器上的应用程序。 清理和重建解决方案。 再次重新部署。

【讨论】:

  • 手机上没有安装该应用程序,它没有出现在任何地方...所以我不能,删除该应用程序。
【解决方案3】:
<MtouchExtraArgs>--interpreter=FSharp.Core ...</MtouchExtraArgs>
<MtouchInterpreter>-all</MtouchInterpreter>

<MtouchExtraArgs>--linkskip=FSharp.Core ...</MtouchExtraArgs>

https://github.com/xperiandri/Elmish.Uno/ 都为我工作

【讨论】:

    猜你喜欢
    • 2017-07-15
    • 1970-01-01
    • 2019-03-03
    • 2021-03-19
    • 2017-03-25
    • 2018-10-11
    • 1970-01-01
    • 1970-01-01
    • 2013-08-23
    相关资源
    最近更新 更多