Xamarin Build因Visual Studio 2015中的-25320未知错误而失败

时间:2017-01-12 15:33:09

标签: ios xamarin xamarin.ios

我遇到了一个问题,就像尝试在Visual Studio 2015上使用Xamarin构建任何IOS应用程序(即使是一个带有单个按钮的空白应用程序而根本没有代码)时,我收到以下错误消息: -

1>------ Build started: Project: anotherTest, Configuration: Debug iPhone 
1>  Generated session id: 918b34de762e8cb2603d83fb22be8494
1>  Generated build app name: anotherTest
1>  Connecting to Mac server 192.168.0.36...
1>  anotherTest -> D:\Local sites\XamarinFresh\anotherTest\anotherTest\bin\iPhone\Debug\anotherTest.exe
1>  Detected signing identity:
1>    Code Signing Key: "iPhone Developer: xxxx xxxxx (2YL57YJ875)" (62943356AF268E06164BD4D6432932995AF3A2CA)
1>    Provisioning Profile: "iOS Team Provisioning Profile: net.xxxxx.*" (05eb6d91-b645-4b45-ae20-b1c23576702c)
1>    Bundle Id: net.xxxxx.anothertest
1>    App Id: QCQ62TK5N6.net.xxxxx.anothertest
1>  SecKey API returned: -25320, (null)/Users/xxxxxxx/Library/Caches/Xamarin/mtbs/builds/anotherTest/918b34de762e8cb2603d83fb22be8494/bin/iPhone/Debug/anotherTest.app: unknown error -1=ffffffffffffffff
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1541,3): error : Tool exited with code: 1. Output: SecKey API returned: -25320, (null)/Users/xxxxx/Library/Caches/Xamarin/mtbs/builds/anotherTest/918b34de762e8cb2603d83fb22be8494/bin/iPhone/Debug/anotherTest.app: unknown error -1=ffffffffffffffff
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1541,3): error : 
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

我重新安装了Visual Studio 2015并完成了所有可用的Xamarin更新,可以使用所有软件的最新版本访问Mac,并且密钥链设置已设置为始终允许。

任何人都可以了解正在发生的事情或不构建的原因吗?

1 个答案:

答案 0 :(得分:0)

在您键入security error -25320时在macOS上,您可以进一步了解问题所在:

security error -25320
Error: 0xFFFF9D18 -25320 In dark wake, no UI possible

因此,代码签名正在触发UI挑战,由于Xamarin运行构建的方式,它不被允许。我遇到了这种在macOS上导入钥匙串的方法,以避免这个问题:

security set-key-partition-list -S apple: -k <Password> -D <Identity> -t private <your.keychain>

向Bochun Bai大声示意,花了3个星期的时间与Apple支持人员一起寻找解决方案,找到类似的声音-25308问题并将其发布到https://sinofool.net/blog/archives/322