locked
Visual Studio for Mac - No SDK found at specified location. RRS feed

  • Question

  • User167521 posted

    I just updated visual Studio for Mac to 8.8 (build 1651) and now I'm getting this build error.

    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Shared.targets(3,3): Error: Could not find a valid Xcode app bundle at '/Applications/Xcode.app/Contents/Developer/'. Please update your Apple SDK location in Visual Studio's preferences (Projects > SDK Locations > Apple > Apple SDK). (HPPageLiftProxy.OSX)

    In VS Preferences, this is what it's showing.

    I'm down :'( . How do I fix this?

    Thanks

    Here's my current environment:

    === Visual Studio Enterprise 2019 for Mac ===

    Version 8.9 (build 1651) Installation UUID: aaddbdd9-5a26-4ee5-abd9-1a5540d751e7 GTK+ 2.24.23 (Raleigh theme) Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

    Package version: 612000122
    

    === Mono Framework MDK ===

    Runtime: Mono 6.12.0.122 (2020-02/c621c35ffa0) (64-bit) Package version: 612000122

    === Roslyn (Language Service) ===

    3.9.0-5.21112.8+f3ff04378c972d435826e6181de364b3c0db8d14

    === NuGet ===

    Version: 5.8.0.6860

    === .NET Core SDK ===

    SDK: /usr/local/share/dotnet/sdk/5.0.103/Sdks SDK Versions: 5.0.103 5.0.102 5.0.101 5.0.100 3.1.406 3.1.405 3.1.404 3.1.403 3.1.402 3.1.401 3.1.302 3.1.301 3.1.300 3.1.202 3.1.200 3.1.102 3.1.100 3.0.101 2.1.700 2.1.4 MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks

    === .NET Core Runtime ===

    Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 5.0.3 5.0.2 5.0.1 5.0.0 3.1.12 3.1.11 3.1.10 3.1.9 3.1.8 3.1.7 3.1.6 3.1.5 3.1.4 3.1.2 3.1.0 3.0.1 2.1.23 2.1.22 2.1.21 2.1.20 2.1.19 2.1.18 2.1.17 2.1.16 2.1.15 2.1.14 2.1.11 2.0.5

    === .NET Core 3.1 SDK ===

    SDK: 3.1.406

    === Xamarin.Profiler ===

    Version: 1.6.15.68 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

    === Updater ===

    Version: 11

    === Xamarin.Android ===

    Version: 11.2.0.0 (Visual Studio Enterprise) Commit: xamarin-android/d16-9/f908d16 Android SDK: /Users/hpadmin/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 6.0 (API level 23) 7.1 (API level 25) 8.1 (API level 27)

    SDK Tools Version: 26.1.1 SDK Platform Tools Version: 30.0.4 SDK Build Tools Version: 30.0.2

    Build Information: Mono: 5e9cb6d Java.Interop: xamarin/java.interop/d16-9@1d382be ProGuard: Guardsquare/proguard/v7.0.1@912d149 SQLite: xamarin/sqlite/3.32.2@cfe06e0 Xamarin.Android Tools: xamarin/xamarin-android-tools/main@ad80a42

    === Microsoft OpenJDK for Mobile ===

    Java SDK: /Users/hpadmin/Library/Developer/Xamarin/jdk/microsoftdistopenjdk_1.8.0.25 1.8.0-25 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL

    === Android SDK Manager ===

    Version: 16.9.0.22 Hash: a391de2 Branch: remotes/origin/d16-9 Build date: 2021-02-18 03:14:56 UTC

    === Android Device Manager ===

    Version: 16.9.0.17 Hash: fc2b3db Branch: remotes/origin/d16-9 Build date: 2021-02-18 03:15:18 UTC

    === Apple Developer Tools ===

    A valid Xcode installation was not found at the configured location: '/Applications/Xcode.app/Contents/Developer/'

    === Xamarin.Mac ===

    Version: 7.8.2.5 (Visual Studio Enterprise) Hash: 3836759d4 Branch: d16-9 Build date: 2021-02-10 17:56:43-0500

    === Xamarin.iOS ===

    Version: 14.14.2.5 (Visual Studio Enterprise) Hash: 3836759d4 Branch: d16-9 Build date: 2021-02-10 17:56:44-0500

    === Xamarin Designer ===

    Version: 16.9.0.316 Hash: bd2705417 Branch: remotes/origin/d16-9 Build date: 2021-02-24 00:16:08 UTC

    === Build Information ===

    Release ID: 809001651 Git revision: c05b1dec4362b5956d47624a437e900ffdc9aa0a Build date: 2021-02-25 11:27:51-05 Build branch: release-8.9 Xamarin extensions: c05b1dec4362b5956d47624a437e900ffdc9aa0a

    === Operating System ===

    Mac OS X 10.15.7 Darwin 19.6.0 Darwin Kernel Version 19.6.0 Tue Jan 12 22:13:05 PST 2021 root:xnu-6153.141.16~1/RELEASEX8664 x86_64

    Wednesday, March 3, 2021 3:18 AM

Answers

  • User167521 posted

    @ColeX - so apparently, I'm not alone, https://developercommunity.visualstudio.com/t/vs-2019-mac-fails-to-find-xcode-12/1193691

    This was the workaround from the thread I needed.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, March 4, 2021 3:52 PM

All replies

  • User369978 posted

    Set the path of Xcode in Location , it will search the sdk automatically.

    This is the screenshot on my side .


    Xamarin forums are migrating to a new home on Microsoft Q&A! We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A! For more information, please refer to this sticky post.

    Wednesday, March 3, 2021 9:10 AM
  • User167521 posted

    Thanks @ColeX, but I tried that already yesterday. I probably should have mentioned that. First, after setting the path to Xcode.app I do see what you see, the "Restart Visual Studio" button just closes VS, but it doesn't relaunch. When I relaunch, the SDK location automatically reverted back to /Applications/Xcode.app/Contents/Developer/. In fact, if I set the path to Xcode.app and just hit "OK" to close Preferences. When I immediately reopen Preferences, again, the path has reverted back.

    And again, this just started happening after I updated VS to 8.8 (build 1651) yesterday. Is that the version you have installed and tested?

    Wednesday, March 3, 2021 2:07 PM
  • User167521 posted

    Hey @ColeX , is anybody looking into this? I'm sort of dead in the water here. Thanks.

    Wednesday, March 3, 2021 11:16 PM
  • User369978 posted

    I Will Try to update vs for mac to latest and get you back .

    Thursday, March 4, 2021 1:48 AM
  • User369978 posted

    Have you tried to run Xcode ? XCode may need to install some components when we open it at first time.

    Thursday, March 4, 2021 1:54 AM
  • User167521 posted

    Yes, Xcode launches fine. Xcode was not updated yesterday.

    Thursday, March 4, 2021 1:55 AM
  • User369978 posted

    Everything works fine after I update VS for mac to 8.9 .

    The SDK path is correct and simulator runs fine .

    Thursday, March 4, 2021 2:11 AM
  • User369978 posted

    I suggest you reinstall Xcode , then open Code , and reboot your mac .

    Thursday, March 4, 2021 2:12 AM
  • User167521 posted

    As another datapoint, the option to open a storyboard in Xcode Interface Builder is also no longer available from within Visual Studio's context menu. Which I guess makes sense.

    Thursday, March 4, 2021 2:13 AM
  • User167521 posted

    @ColeX when you set the location to where the Xcode.app is, did you select the "Restart Visual Studio button"? If so, did it really restart? And did the location path stick? I can explicitly set the path as well, and I see what you see. But, it doesn't stick. It always reverts back to /Applications/Xcode.app/Contents/Developer/.

    Thursday, March 4, 2021 2:39 AM
  • User369978 posted

    @"AllanChin.6924" said: @ColeX when you set the location to where the Xcode.app is, did you select the "Restart Visual Studio button"? If so, did it really restart? And did the location path stick? I can explicitly set the path as well, and I see what you see. But, it doesn't stick. It always reverts back to /Applications/Xcode.app/Contents/Developer/.

    I did nothing , the location path is always /Applications/Xcode.app by default .

    I suggest you delete Xcode form applications first ,and reinstall it , and then reboot mac .

    If problem persists , consider creating a support request here : https://support.serviceshub.microsoft.com/supportforbusiness/create?sapId=211dd84f-3474-c3c5-79bf-66db630c92a6 .

    Thursday, March 4, 2021 3:04 AM
  • User167521 posted

    Ok @ColeX . I also see that path on my 11.2 machine. But I didn't update Visual Studio on there. I updated on my 10.15 machine and it's there that has the problem. I'll try uninstalling Xcode and re-installing.

    Thursday, March 4, 2021 3:09 AM
  • User167521 posted

    @ColeX - well I uninstalled and reinstalled Xcode and got the same version along with the same problem. It must be an 8.8 on 10.15 incompatibility because I have 8.8.10 on my 11.2.1 machine and it has no problem. And your 8.9 is not available when I check for updates on 10.15. How do I downgrade Visual Studio?

    I started to create an incident a the support.serviceshub but I need some sort of contract or subscription. I have an MSDN subscription. Does that count?

    Thursday, March 4, 2021 4:56 AM
  • User369978 posted

    And your 8.9 is not available when I check for updates on 10.15.

    I test on macOS Catalina 10.15.7 and the latest version of Vs for mac is 8.9.

    How do I downgrade Visual Studio?

    Select older version (8.8) in Update Check menu and download ,reinstall .

    Thursday, March 4, 2021 6:17 AM
  • User167521 posted

    Ok @ColeX ...

    1. Updated the MacOS to 10.15.7.
    2. Older VS versions were not available for me to select in the Update channel.

    1. I tried the 8.10 Preview, same problem.
    2. Uninstalled VS, and downloaded VS for Mac from my.visualstudio.com.
    3. Got VS 8.9 (1651). So my environment is now the same as yours.
    4. Still no good. I can set the location like you,

    but VS keeps changing it back.

    Please advise. Where else would I be able to download older version of VS for Mac?

    Thursday, March 4, 2021 3:35 PM
  • User167521 posted

    @ColeX - so apparently, I'm not alone, https://developercommunity.visualstudio.com/t/vs-2019-mac-fails-to-find-xcode-12/1193691

    This was the workaround from the thread I needed.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, March 4, 2021 3:52 PM
  • User369978 posted

    @"AllanChin.6924" said: @ColeX - so apparently, I'm not alone, https://developercommunity.visualstudio.com/t/vs-2019-mac-fails-to-find-xcode-12/1193691

    This was the workaround from the thread I needed.

    Great ! If problem has been solved could you mark the answer to finish this thread ?

    Friday, March 5, 2021 5:03 AM
  • User167521 posted

    The workaround DID solve that problem, but I'm still having build issues with 8.8 and 8.9 on 10.15.7 which may or may not be related to this, and are not issues on my iMac running 11.2.1. But since this issue is pretty specific, I will mark as answered and start another thread, if my current issues persist.

    Friday, March 5, 2021 5:07 AM
  • User167521 posted

    @ColeX - where can I get a Visual Studio for Mac installer? One for a specific older version? Or can you provide me one for the version before 8.8? Thanks?

    Friday, March 5, 2021 9:46 PM
  • User399646 posted

    UPDATE:

    The suggested answer did help me! The key was adding the trailing slash to the end of /Applications/Xcode.app/

    Wow! Thanks to the person who discovered this, total shame on M$ and the Xamarin team for such a bogus bug! Such a shame! Many developer hours were wasted unnecesserily.

    ORIGINAL TEST:

    The suggested answer did not help me :(

    1) Problem in VS:

    2)

    3)

    4) After restart, the same problem appears again:

    5) Preferences are back again:

    Friday, March 12, 2021 9:14 AM
  • User400021 posted

    You can try with this, It works for me. No need to reinstall Visual Studio or Xcode and no need to restart.

    Let's assume the location of xcode is at /Applications/Xcode.app (default) Open Terminal, and type: sudo xcode-select --switch /Applications/Xcode.app

    Thursday, March 18, 2021 12:56 AM