我正在尝试从Windows PC编译Visual Studio中的Xamarin IOS解决方案
但我收到以下错误
2> C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Professional \ MSBuild \ Xamarin \ iOS \ Xamarin.iOS.Common.targets(624,3):错误:无法找到SDK bin目录
我已经在网上检查了xCode的默认路径,一切正常。我将Mac上的xCode更新为版本10.0
这是IOS.Common.targets上失败的行
<DetectSdkLocations
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true'"
SdkVersion="$(MtouchSdkVersion)"
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
TargetArchitectures="$(TargetArchitectures)"
>
<Output TaskParameter="SdkVersion" PropertyName="MtouchSdkVersion" />
<Output TaskParameter="SdkRoot" PropertyName="_SdkRoot" />
<Output TaskParameter="SdkBinPath" PropertyName="_SdkBinPath" />
<Output TaskParameter="SdkDevPath" PropertyName="_SdkDevPath" />
<Output TaskParameter="SdkUsrPath" PropertyName="_SdkUsrPath" />
<Output TaskParameter="SdkPlatform" PropertyName="_SdkPlatform" />
<Output TaskParameter="SdkIsSimulator" PropertyName="_SdkIsSimulator" />
<Output TaskParameter="IsXcode8" PropertyName="_IsXcode8" />
</DetectSdkLocations>
最佳答案
更新到Visual Studio> = 15.8.5
更新:
自2018年9月20日起,Visual Studio version 15.8.5 is released包含对XCode 10的官方Xamarin支持。
对于VS的旧版本:回滚XCode 10
编辑:
一位同事报告说,对他来说,启动XCode 10并等待其完成升级配置使他能够正常构建Xamarin iOS项目。我在回滚之前尝试过自己,但没有运气,但也许是YMMV。关于回滚到下面的9.4.1的原始答案。
我为此尝试了许多不同的方法。我接受XCode 10更新后,Xamarin构建立即开始对我失败。在尝试了其他一些东西之后,起作用的只是将XCode回滚到9.4.1。
通过从“应用程序”中删除该应用程序,然后从Apple开发人员站点as shown in this answer下载9.4.1,可以回滚XCode。