Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2019 Fails to connect to Mac's installed Visual Studio for Mac after update "No SDK found at specified location"

Before updating my PC's Visual Studio 2019 (v16.8) I was able to build Xamarin apps and connect to my Mac without issue. After updating to Visual Studio 2019 (v16.9), VS went through the normal process of wanting to update the remote Visual Studio for Mac everything appeared to update without issue, but when trying to connect after the remote update I got an error

"The Xcode license status couldn't be verified because Xcode has not been found on the default location of the connected Mac. Having Xcode installed and functional is necessary in order to build and run iOS apps, so please check that Xcode is correctly installed and that the path specified under iOS Settings is correct."

On the Mac I made sure Xcode and VS for were update to date. (VS had updates which I did), and I still was greeted with the same issue (on windows).

Checking VS for Mac's Preferences Projects->SDK Locations->Apple it shows that it can't find Xcode (it is using a location in /Library/Developer/CommandlineTools/SDKs).

"No SDK found at specified location"

I change that to /Application/Xcode.app which then shows that it can now find it, but requires VS for Mac to be restarted. After doing that, and rechecking the newly set value, I see it has been reverted to the wrong location! No mater what I try, every time I go back to view the setting it always reverts.

I assume I need that pref changed but I can't seem to get the value to stay

like image 685
Ken Avatar asked Mar 04 '21 17:03

Ken


3 Answers

Long story short, this solved my issue

In Mac terminal I ran

sudo xcode-select --reset

Unfortunately I can't find the Xamarin form that lead me to the answer, however I remember it said I needed to install xcode-select sudo xcode-select --install. Doing this errored out because It was already installed

xcode-select: error: command line tools are already installed use "Software Update" to install updates

I tried running Sudo xcode-select --update but that wasn't a valid command. However it did give me a list of valid options where I saw the reset option.

While trying to re-find the original post (I never did find it again) I stumbled upon this stackoverflow post (xcode-select active developer directory error) which I think describes what might have happened. An answer lower on the page (https://stackoverflow.com/a/48154263/13130043) is the same as what I figured out.

like image 85
Ken Avatar answered Oct 08 '22 18:10

Ken


You should go to (Tools > Options > Xamarin > iOS Settings) if you're using Visual Studio on Windows. In the Apple SDK section, check the Xcode path there.

Mine also changed to /Library/Developer/CommandlineTools somehow after updating VS to 16.9.0

It works again after changing it to /Applications/Xcode.app

like image 38
Tony Yu Avatar answered Oct 08 '22 16:10

Tony Yu


Just put a "/" at the end of the url. It works for me.

Ex: "/Applications/Xcode.app/"

like image 6
Cristian David Canarte Mutis Avatar answered Oct 08 '22 18:10

Cristian David Canarte Mutis