Visual Studio for Mac: No SDK found at specified location.

Lars Gossard 51 Reputation points
2021-03-03T12:31:59.417+00:00

After updating Visual Studio for Mac to version 8.9 the Apple SDK is no longer found. When entering /Applications/Xcode.app Visual Studio states XCode 12.4 found at default location. After restarting Visual Studio it is set back to /Library/Developer/CommandLineTools stating No SDK found at specified location.

Also, there is no longer an iOS item in section Projects.

Trying to compile an iOS project on the command line throws this error:
Could not find a valid Xcode app bundle at '/Library/Developer/CommandLineTools'. Please update your Apple SDK location in Visual Studio's preferences (Projects > SDK Locations > Apple > Apple SDK).

What happened? I could not find any related information in the Release notes.
73788-applesdkfound.jpg

73760-applesdknotfound.jpg

73729-xcodenotfound.jpg

73730-xcode.jpg

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,798 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Paul Pflug 121 Reputation points
    2021-03-05T08:53:44.227+00:00

    Try to change the location to /Applications/Xcode.app/ (with trailing slash). After restarting VS it works for me.

    74743-bildschirmfoto-2021-03-05-um-095242.png

    24 people found this answer helpful.

  2. Hui Li 6 Reputation points Microsoft Employee
    2021-04-21T20:17:47.123+00:00

    @Lars Gossard
    You can set the path to /Applications/Xcode.app to fix the issue.
    You can open xcode on your macbook and check "Locations" , then "Command Line Tools", choose Xcode that you installed, copy the location to the Visual Studio preferences-->SDK Locations-->Apple-->Location

    1 person found this answer helpful.

  3. Robert de Jongh 5 Reputation points
    2023-08-24T11:49:10.34+00:00

    I fixed it by starting Xcode then select "Settings..." and then in the Locations tab I choose Command Line Tools. Initially the path /Application/Xcode.app was empty.

    I hope this helps.

    1 person found this answer helpful.

  4. Cole Xia (Shanghai Wicresoft Co,.Ltd.) 6,751 Reputation points
    2021-03-22T03:16:30.76+00:00
    0 comments No comments