question

LarsGossard-2852 avatar image
9 Votes"
LarsGossard-2852 asked kajalpokale-4566 published

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

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-supported
applesdkfound.jpg (15.7 KiB)
xcodenotfound.jpg (7.0 KiB)
xcode.jpg (13.9 KiB)
· 10
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Trailing slash was the problem thx!

5 Votes 5 ·

Good lord have mercy!
So I struggled with this and wasted a day of work trying to figure out why, all of the sudden, this began happening.
Same exact situation. no reasonable solution

This is a bug in VS for Mac. Please fix this.

1st off, the recent VS update broke this. I re-installed my entire mac. Wiped the hard drive completely. Re-Installed XCode, VS for Mac, Everything. Whaat a mess.

and it was fixed.... for a bloody day!

Next thing I know, back to the same problem.

Browsing to the correctly installed XCode.app should be all you would need to do.

However, Thanks to paulpflug up there, I did not have to resort to hari-kari. The trailing slash (how did you figure that out??) fixed it.

sheesh, folks.

3 Votes 3 ·

How can such a mistake really happen. You can't see it in any release notes and we lost a whole day to solve the problem. I really can't understand how such a ridiculous mistake can be made.

2 Votes 2 ·

did you open xcode? First time it is run it installs some needed stuff

0 Votes 0 ·

Yes, see my 4th screenshot. I also uninstalled and reinstalled Visual Studio for Mac. No success.

0 Votes 0 ·

I can confirm the original poster's problem.

I haven't tried yet reinstalling XCode as I've already installed most recent version (12.4) and wouldn't want to reinstall the ca. 15 GB just to test this out.

0 Votes 0 ·

It happens for me after installing brew, required to install gh the new gitbuh command line, as standard git is now unable to get any github repo.

I reinstalled xcode, same issue.

Using the / at the end worked.
You are really silly noobs ms guys.

Same issue in Vs Windows.

0 Votes 0 ·

same for me after installing brew. I followed suggestion paulpflug and it worked fine but why brew caused this issue? was something changed in Xcode or VS?

0 Votes 0 ·
Show more comments
HuiLi-3685 avatar image
1 Vote"
HuiLi-3685 answered kajalpokale-4566 published

@LarsGossard-2852
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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I have faced the same issue after installing brew,
but your solution worked for me, thanks.
After setting this location need to restart the visual studio.

0 Votes 0 ·
ColeXia-MSFT avatar image
0 Votes"
ColeXia-MSFT answered

A fix for this issue has been released! Install the most recent release from https://visualstudio.microsoft.com/downloads/.
Check https://developercommunity2.visualstudio.com/t/VS-2019-Mac-Fails-To-Find-Xcode-12/1193691 .

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

paulpflug avatar image
21 Votes"
paulpflug answered MichaelHu-1101 commented

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



· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you, that fixed the problem for me.

1 Vote 1 ·

Thank... thank !!!!!!!!!!!!!! but
what is the logic of this "/" in the end?
And how HOW by God did you think of that?
Never mind, it worked and ready.
![76883-image.png][1]


1 Vote 1 ·
image.png (469.3 KiB)

Thanks! This prevented me from deinstalling Visual Studio for Mac and reverting back to developing with a Windows PC.

0 Votes 0 ·

Damn, I'm already reinstalling Xcode while reading this. I'll mark this as the accepted answer as soon as I can try it and confirm it solves the problem.

0 Votes 0 ·

all of us friends, we all did it… and it was just… /

0 Votes 0 ·

@paulpflug simple and obvious fix that I completely failed to think of for hours. A day of my life I'll never get back but at least with your fix tomorrow will be a more productive day.

0 Votes 0 ·
Show more comments