2

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)

Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
Daniel Wardin
  • 1,840
  • 26
  • 48
  • So which version did you install? What does `dotnet --version` show you? – Martin Ullrich Jun 17 '19 at 08:28
  • 1
    E.g. `2.2.300` should work – Martin Ullrich Jun 17 '19 at 08:29
  • Yeah found questions on Microsoft's forum this morning and did exactly that - seems like a lot of people had their environments broken since Friday. I posted an answer explaining the problem and links to the pages which will hopefully help with any future issues too :) – Daniel Wardin Jun 17 '19 at 08:33

1 Answers1

3

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.

Daniel Wardin
  • 1,840
  • 26
  • 48
  • 1
    fyi The detailed download pages list which versions of VS/Mac or VS/Win are compatible with each version: https://dotnet.microsoft.com/download/dotnet-core/2.2 – Martin Ullrich Jun 17 '19 at 08:33