Visual Studio won't compile Xamarin IOS Could not locate SDK bin directory

  • A+
Category:Languages

I'm trying to compile a Xamarin IOS solution in Visual Studio from Windows PC but I get the following error 2>C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/MSBuild/Xamarin/iOS/Xamarin.iOS.Common.targets(624,3): error : Could not locate SDK bin directory

I have already checked online for the default paths for xCode and it's all ok. I updated xCode on the mac to version 10.0

This is the lines on the IOS.Common.targets that are failing

<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> 

 


Rollback XCode 10

Edit: A colleague reported that, for him, launching XCode 10 and waiting for it to finish its upgrade configuration allowed him to build Xamarin iOS projects normally. I tried that myself before rollback and didn't have luck, but perhaps YMMV. Original answer about rolling back to 9.4.1 below.

I tried a lot of different approaches to this. Xamarin builds started failing for me immediately after I accepted the XCode 10 update. After trying a few other things, the thing that worked was just rolling back XCode to 9.4.1.

You can rollback XCode by deleting the application from your Applications and then downloading 9.4.1 from the Apple developer site, as shown in this answer.

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: