Search code examples
macos.net-corevisual-studio-mac.net-core-2.2

Visual Studio for Mac Broken After New Update - .NET Core 2.2 SDK is not compatible


I ran an update on Friday morning and everything stopped working since then.

When trying to build my .NET Core projects I'm getting this error:

Error: NET Core 2.2 SDK version 2.2.100 is not compatible with this version of Visual Studio for Mac. Install the latest update to the .NET Core 2.2 SDK by visiting https://aka.ms/vs/mac/install-netcore22. (Project.Namespace.Name)

I have tried installing the SDK from the website, uninstalling all SDKs and Runtimes, reinstalling them. Uninstalling Visual Studio and reinstalling it. Still getting the same errors.

I even tried different versions of the SDKs, going from the latest version all the way back to 2.2.100.

Seems like the issue is not with the SDKs as it worked previously. It either seems Visual Studio for Mac or some metadata somewhere which is breaking things and doesn't get removed when uninstalling using the instructions provided on the Microsoft website.

Any advice?

Can't build anything and can't find any answer in related questions which fixed the issue for me.

Visual Studio for Mac Community 8.1 (Build 2742)


Solution

  • Seems like a lot of other people were experiencing this issue since Friday and have submitted questions to Microsoft.

    This is the link which helped me resolve it.

    https://learn.microsoft.com/en-us/visualstudio/mac/net-core-support?view=vsmac-2019

    This is the question which helped me find the solution.

    https://developercommunity.visualstudio.com/content/problem/607287/vs-for-mac-2019-broke-with-netcore-22107-sdk.html

    Hope it helps anyone else who has been experiencing these issues.

    Problem is Visual Studio updated, and it didn't support the .NET Core version which was installed and it wasn't updated - the link in the error message didn't help with the issue at the time but as pointed out by Martin in the comments, it shows the compatible Visual Studio versions next to each SDK version, so it took a very long time to find a solution.

    v2.2.300 fixed the issue like suggested in the comments :)

    Please remember that Visual Studio for Mac is not compatible with every version of the SDK, anytime it updates, you may need to update your SDK to a compatible version which you will be able to find in the links above.