ios - 配置文件中的重复 key 导致构建失败: error MSB4018

标签 ios xamarin azure-devops provisioning-profile build-agent

我的 Xamarin 构建任务在 Azure Dev Ops 管道中失败,原因如下:

错误 MSB4018:“DetectSigningIdentity”任务意外失败。

错误 MSB4018:System.ArgumentException:已添加具有相同键的项目。键:com.apple.developer.linked-domains

打开构建代理上安装的配置文件时,我确实可以看到 com.apple.developer.linked-domains 键两次包含在权利字典中:

<key>Entitlements</key>
<dict>
    <key>keychain-access-groups</key>
    <array>
        <string>xxxxxxx</string>        
    </array>
    <key>get-task-allow</key>
    <false/>
    <key>application-identifier</key>
    <string>xxxxxxxx</string>
    <key>com.apple.developer.healthkit</key>
    <true/>
    <key>com.apple.developer.healthkit.access</key>
    <array>
        <string>health-records</string>
    </array>
    <key>com.apple.developer.associated-domains</key>
    <string>*</string>
    <key>com.apple.developer.team-identifier</key>
    <string>xxxxxxxxx</string>
    <key>com.apple.developer.associated-domains</key>
    <string>*</string>

</dict>

我编辑了代理上的配置文件并删除了重复项并禁用了安装配置文件任务,它可以正常工作。但是,此手动解决方法不适用于托管构建代理。

有什么想法为什么会发生这种情况或如何解决吗? (我用 xxxxxxx 编辑了上面的敏感内容)。

最佳答案

看起来这个问题已经在苹果开发者门户端修复了。通过我的企业帐户,我能够生成具有多种功能且无重复 key 的开发、临时和内部配置文件。

我没有看到 Apple 关于该主题的官方通知,但我能够创建发布版本并将其成功部署到设备。

关于ios - 配置文件中的重复 key 导致构建失败: error MSB4018,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53794998/

相关文章:

azure - 如何让 Azure Devops 识别订阅连接具有新的访问 token ?

ios - 带有 Slider、textField 和自动布局的 UIStackView

xamarin - 如何在 Xamarin.Forms 中播放系统声音

ios - 如何禁用某些 ViewController 的导航栏

xamarin - 如何将对象传递给 Xamarin Forms 自定义渲染器?

cocoa - 如何从我的代码中打开 .dmg 文件?

asp.net-core - Azure Pipelines 在脚本中使用包含换行符的字符串值设置变量

AzureResourceManagerTemplateDeployment 在 Azure DevOps 管道中失败

html - 在iPhone中解析HTML网址

ios - 检查倒计时是否已为零并更新 UILabel