The first thing you have to do is to Tap.
brew tap junian/homebrew-dotnet
Note
If you're currently using .NET formula from official homebrew-cask
, you need to zap it first e.g., brew uninstall --zap dotnet-sdk
.
You can install .NET version as you wish.
brew install dotnet-sdk@<version>
Or
brew install junian/dotnet/dotnet-sdk@<version>
You can also uninstall .NET version as you wish.
brew uninstall dotnet-sdk@<version>
Or
brew uninstall junian/dotnet/dotnet-sdk@<version>
Version | Formula |
---|---|
.NET 10 RC-1 | [email protected] |
.NET 9 | [email protected] |
.NET 8 (LTS) | [email protected] |
.NET 7 | [email protected] |
.NET 6.0 (LTS) | [email protected] |
.NET 5.0 | [email protected] |
There is no .NET 4 or .NET Core 4. To avoid confusion, version 4.x is strictly for .NET Framework, can only run on Windows. Microsoft transition from .NET Core to just .NET starting from version 5.
The closest thing with .NET Framework 4.X on macOS is Mono MDK.
Version | Formula |
---|---|
.NET Core 3.1 (LTS) | [email protected] |
.NET Core 3.0 | [email protected] |
.NET Core 2.2 | [email protected] |
.NET Core 2.1 (LTS) | [email protected] |
.NET Core 2.0 | [email protected] |
.NET Core 1.1 | [email protected] |
.NET Core 1.0 | [email protected] |
If you install .NET Core 3.1 or .NET 5 on Apple Sillicon Mac, the dotnet
binary is located at /usr/local/share/dotnet/x64/dotnet
.
You can make an alias such as alias dotnet-x64=/usr/local/share/dotnet/x64/dotnet
.
Then use it in command like like:
% dotnet-x64 --list-sdks
3.1.426 [/usr/local/share/dotnet/x64/sdk]
5.0.408 [/usr/local/share/dotnet/x64/sdk]
Before Microsoft created a cross-platform .NET, there is a community-developed .NET-compatible implementation called Mono.
Version | Formula |
---|---|
Mono MDK 6.12 | [email protected] |
Following packages depend on Mono MDK.
Version | Formula |
---|---|
Xamarin Mac | [email protected] |
Xamarin iOS | [email protected] |
Xamarin Android | [email protected] |
Following apps requires Mono MDK.
Version | Formula |
---|---|
Visual Studio 2022 for Mac | visual-studio@2022 |
If you're confused with .NET version and naming, here's a brief history:
- 2002: .NET Framework (Windows-only, closed source)
- 2004: Mono (Community-driven, cross-platform, open source)
- 2011: Xamarin (Mono for Android, MonoTouch for iOS)
- 2016: Microsoft acquires Xamarin & releases .NET Core (Modern, cross-platform, open source)
- 2020: .NET 5 unifies everything into one platform, simply called .NET (cross-platform, open source)