How to install multiple versions of .NET on macOS
1 min read
- Add the Microsoft package feed to your system
brew tap isen-ng/dotnet-sdk-versions
- Install the desired version of the .NET SDK
brew install --cask dotnet-sdk-6-0-400brew install --cask dotnet-sdk-7-0-400
- Verify the installation
dotnet --list-sdks
This way you can use multiple versions of the .NET SDK in parallel.
In your .NET code you can specify the desired version in the global.json file:
{ "sdk": { "version": "7.0.400" }}
Resources: