ios - Xamarin Forms - iOS - 错误 MT3001 : Could not AOT the assembly

标签 ios xamarin xamarin.forms xamarin.ios aot

Xamarin Forms iOS 项目于 2019 年 10 月 10 日在昨天构建。今天更新到 Mac 和 Windows 上的最新组件,项目不再构建。

构建:发布 - iPhone - TestMobile.iOS - 设备

项目适用于 Mac 模拟器。项目在 iPhone 硬件上部署和调试。

  • Visual Studio Pro 2019 - 16.3.4
  • 适用于 Mac 的 Visual Studio 2019 - 8.3.3
    建 8
  • Mac 上最新的所有组件
  • MacOS Catalina 10.15

  • 构建日志:
    3>  AOT Compilation exited with code 1, command:
    3>  MONO_PATH=/Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C:/Temp/iOS/mtouch-cache/32/3-Build /Library/Frameworks/Xamarin.iOS.framework/Versions/13.4.0.2/bin/arm-darwin-mono-sgen --debug -O=gsharedvt -O=-float32  --aot=mtriple=armv7-ios,data-outfile=/Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C:/Temp/iOS/mtouch-cache/armv7/ZXingNetMobile.aotdata.armv7,static,asmonly,direct-icalls,full,soft-debug,dwarfdebug,no-direct-calls,outfile=/Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C:/Temp/iOS/mtouch-cache/armv7/ZXingNetMobile.dll.s "/Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C:/Temp/iOS/mtouch-cache/32/3-Build/ZXingNetMobile.dll"
    3>  '/Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C' in MONO_PATH doesn't exist or has wrong permissions.
    3>  '/Temp/iOS/mtouch-cache/32/3-Build' in MONO_PATH doesn't exist or has wrong permissions.
    3>  The assembly mscorlib.dll was not found or could not be loaded.
    3>  It should have been installed in the `/Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/sdks/out/ios-cross32-release/lib/mono/4.5/mscorlib.dll' directory.
    3>  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang  -Wno-receiver-forward-class -Wno-objc-missing-super-calls -Wno-unguarded-availability-new -stdlib=libc++ -gdwarf-2 -std=c++14 -I/Library/Frameworks/Xamarin.iOS.framework/Versions/13.4.0.2/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.1.sdk -Qunused-arguments -miphoneos-version-min=8.0 -arch arm64 -c -o /Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C:/Temp/iOS/mtouch-cache/arm64/registrar.o -x objective-c++ -DDEBUG /Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C:/Temp/iOS/mtouch-cache/64/registrar.m
    
    3>  C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(842,3): 
    error MT3001: Could not AOT the assembly '/Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C:/Temp/iOS/mtouch-cache/64/3-Build/TestMobileXF.iOS.exe'
    

    尝试 iOS build设置:
  • 链接器行为
  • 支持的架构
  • LLVM 编译器
  • 增量构建

  • 恢复 Visual Studio Pro 2019 是最后的手段。任何想法表示赞赏。

    最佳答案

    发现问题。在 iOS.csproj 文件中为 iPhone 设置此项 - 发布配置文件:

    <IntermediateOutputPath>obj\iPhone\ReleaseTemp</IntermediateOutputPath>
    

    link
    link

    我在详细构建日志中看到“MONO_PATH 不存在或权限错误”。

    项目现在构建,我可以创建一个存档,并在 Mac 上查看 IPA 文件。

    关于ios - Xamarin Forms - iOS - 错误 MT3001 : Could not AOT the assembly,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58348830/

    相关文章:

    c# - Xamarin Live 播放器错误

    ios - Webview 总是在 ios Xamarin.Forms 中返回空白屏幕

    c++ - iOS 上的 OpenCv 2.4.7 错误 background_segm.hpp #include <list> not found

    ios - 在 AFNetworking 中找不到具有指定主机名的服务器

    ios - Xamarin UI 测试无法识别 iOS 应用程序的系统对话框

    c# - 如何删除xamarin形式的操作栏?

    ios - 错误 MT0117 : Can't launch a 32-bit app on a simulator that only supports 64-bit apps (iPhone 6s)

    c# - Xamarin UI 测试 : Is it possible to interact with the OS level dialogues during UITesting

    javascript - 当我在 iOS 网站上输入密码时如何隐藏最后一位数字

    ios - 使用 AFNetworking 2.0 对数据进行 PUT 请求