【问题标题】:Cannot build Xamarin.Forms iOS project无法构建 Xamarin.Forms iOS 项目
【发布时间】:2019-10-31 17:30:44
【问题描述】:

我正在尝试在 Azure DevOps 上构建我们的 Xamarin.Forms 应用程序,但它在 iOS 上失败并出现以下错误:

Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.1.sdk/System/Library/Frameworks/Photos.framework/Headers/PHImageManager.h(18,2):错误 GB12A9FDE:“照片需要 C++11 或更高版本”[/Users/runner/runners/2.159.2/work/1/s/My_MobileApp/My_MobileApp.iOS/My_MobileApp.iOS.csproj]

该应用最初是在 VS 2017 上创建的,然后迁移到 VS 2019。它可以工作,但由于某种原因昨天停止了构建。

我能做些什么来解决它?

【问题讨论】:

标签: ios xamarin.forms photosframework


【解决方案1】:

好的,解决了:

我们使用以下内联脚本在 xamarin.ios 构建任务之前添加了一个命令行任务:

/bin/bash -c "echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'$(xcode.root);sudo xcode-select --switch $(xcode.root)/Contents/Developer"

并将名为 xcode.root 的变量设置为 /Applications/Xcode_10.3.app 以覆盖构建代理上的错误版本的 xcode 这有点骇人听闻,所以一旦上游解决了问题,我们将需要删除该覆盖。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-09-17
    • 1970-01-01
    • 2019-03-17
    • 2015-01-24
    • 2016-09-19
    • 1970-01-01
    • 2015-11-15
    • 1970-01-01
    相关资源
    最近更新 更多