Skip to content

Install .NET SDK side-by-side on macOS with Homebrew package manager.

License

Notifications You must be signed in to change notification settings

junian/homebrew-dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

131 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

     

Homebrew dotnet

Install the .NET SDK side-by-side on macOS using the Homebrew package manager.

How to Use

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-dotnet

Installation

Install the desired .NET version:

brew install dotnet-sdk@<version>

For example, to install .NET SDK 10.0:

brew install [email protected]

Uninstallation

Uninstall the desired .NET version:

brew uninstall dotnet-sdk@<version>

For example:

brew uninstall [email protected]

.NET SDK Versions

Version Formula
⚠️ .NET 11 (Preview) [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.

Where Is .NET 4 / .NET Core 4?

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.

.NET Core SDK Versions

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]

Special Note for .NET Core 3.1 and .NET 5

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/dotnet

Then 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]

Mono MDK Version

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]

Xamarin Versions

These packages depend on Mono MDK:

Version Formula
Xamarin.Mac [email protected]
Xamarin.iOS [email protected]
Xamarin.Android [email protected]

Visual Studio for Mac

This application also depends on Mono MDK:

Version Formula
Visual Studio 2022 for Mac visual-studio@2022

Brief History of .NET

If you’re confused about .NET versions and naming, here’s a quick history:

  1. 2002: .NET Framework (Windows-only, closed source)
  2. 2004: Mono (community-driven, cross-platform, open source)
  3. 2011: Xamarin (Mono for Android, MonoTouch for iOS)
  4. 2016: Microsoft acquires Xamarin and releases .NET Core (modern, cross-platform, open source)
  5. 2020: .NET 5 unifies everything into one platform, simply called .NET (cross-platform, open source)

Cask Updater

A simple script is provided to automatically update the supported .NET casks.

Install .NET 10, then run:

./update_casks.cs

If 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.

LICENSE

MIT

About

Install .NET SDK side-by-side on macOS with Homebrew package manager.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Contributors