How to install .NET on macOS

Upgrading .NET versions on macOS can be a hassle, last time I wanted to update I had to find and remove all installed versions with dotnet-core-uninstall.

Instead of using the official installer I recommend to use homebrew with homebrew-dotnet-sdk-versions.

brew tap isen-ng/dotnet-sdk-versions
brew install --cask dotnet-sdk6-0-400
dotnet --list-sdks

If your .NET and Visual Studio Code is not working correctly, try enabling OmniSharp by going to the Extension settings and setting dotnet.server.useOmnisharp to true.