If you are currently using the .NET formula from the official Homebrew Cask, you should uninstall it first. For example:
brew uninstall --zap dotnet-sdk
First, tap the repository:
brew tap junian/homebrew-dotnetInstall the desired .NET version:
brew install dotnet-sdk@<version>For example, to install .NET SDK 10.0:
brew install [email protected]Uninstall the desired .NET version:
brew uninstall dotnet-sdk@<version>For example:
brew uninstall [email protected]| Version | Formula |
|---|---|
[email protected] |
|
| ⭐️ .NET 10 (LTS) | [email protected] |
| ⭐️ .NET 9 | [email protected] |
| ⭐️ .NET 8 (LTS) | [email protected] |
| .NET 7 | [email protected] |
| .NET 6 (LTS) | [email protected] |
| .NET 5 | [email protected] |
- ⭐️ Active: During the active support period, .NET releases are updated to improve functional capabilities and mitigate security vulnerabilities.
⚠️ Preview: Preview releases provide early access to features that are currently under development. These releases are generally not supported for production use.- Other releases have reached end of life, meaning they're no longer supported. It's recommended to moving to a supported release.
There is no .NET 4 or .NET Core 4. Version 4.x is reserved for .NET Framework, which only runs on Windows.
Microsoft transitioned from .NET Core to simply .NET starting with version 5.
The closest alternative to .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] |
On Apple Silicon Macs, if you install .NET Core 3.1 or .NET 5, the dotnet binary is located at:
/usr/local/share/dotnet/x64/dotnet
You can create an alias:
alias dotnet-x64=/usr/local/share/dotnet/x64/dotnetThen use it, for example:
% 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 was a community-developed .NET-compatible implementation called Mono.
| Version | Formula |
|---|---|
| Mono MDK 6.12 | [email protected] |
These packages depend on Mono MDK:
| Version | Formula |
|---|---|
| Xamarin.Mac | [email protected] |
| Xamarin.iOS | [email protected] |
| Xamarin.Android | [email protected] |
This application also depends on Mono MDK:
| Version | Formula |
|---|---|
| Visual Studio 2022 for Mac | visual-studio@2022 |
If you’re confused about .NET versions and naming, here’s a quick 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 and releases .NET Core (modern, cross-platform, open source)
- 2020: .NET 5 unifies everything into one platform, simply called .NET (cross-platform, open source)
A simple script is provided to automatically update the supported .NET casks.
Install .NET 10, then run:
./update_casks.csIf updates are available, the script will modify the cask files. Commit and push the changes afterward.
Most of the time, you don’t need to run it manually, as updates are checked every 4 hours via GitHub Workflow.
This repo is on autopilot, meaning every new minor version update will be handled by GitHub Actions. I'll just update it occassionally such as when a major version is released or the old versions no longer supported.