This article teaches you about which versions of .NET are supported on macOS, how to install .NET, and what the difference is between the SDK and runtime.
The following table lists the supported .NET releases, and which macOS they're supported on. These versions remain supported until either the version of .NET reaches end-of-support or the version of macOS is no longer supported.
macOS Version
.NET
macOS 15 "Sequoia"
9.0, 8.0
macOS 14 "Sonoma"
9.0, 8.0
macOS 13 "Ventura"
9.0, 8.0
The following versions of .NET are ❌ no longer supported:
.NET 7
.NET 6
.NET 5
.NET Core 3.1
.NET Core 3.0
.NET Core 2.2
.NET Core 2.1
.NET Core 2.0
Runtime or SDK
The runtime is used to run apps created with .NET. When an app author publishes an app, they can include the runtime with their app. If they don't include the runtime, it's up to the user to install the correct runtime.
There are two runtimes you can install on macOS, and both are included with the SDK.
ASP.NET Core Runtime
Runs ASP.NET Core apps. Includes the .NET runtime. Not available as an installer.
.NET Runtime
This runs normal .NET apps, but not specialized apps, such as apps built on ASP.NET Core.
The SDK is used to build and publish .NET apps and libraries. The latest SDK supports building apps for previous versions of .NET. In normal circumstances, you would only need the latest SDK installed.
Installing the SDK includes both the standard .NET Runtime and the ASP.NET Core Runtime. For example, if you have .NET SDK 9.0 installed, then .NET Runtime 9.0 and ASP.NET Core 9.0 Runtime are both installed. However, any other runtime version wouldn't be installed with the SDK and would require you to install it separately.
Choose how to install .NET
There are different ways to install .NET, and some products might manage their own version of .NET. If you install .NET through software that manages its own version of .NET, it might not be enabled system-wide. Make sure you understand the implications of installing .NET through other software.
If you're unsure which method you should choose after reviewing the lists in the following sections, you probably want to use the .NET Installer package.
Select the link to the .NET version you want to install, such as .NET 8.0.
This link brings you to the page with links to download that version of .NET
If you're going to install the SDK, choose the latest .NET version. The SDK supports building apps for previous versions of .NET.
Tip
If you're unsure which version to download, choose the version marked latest.
This page presents the download links for the SDK and the Runtime. Here you download the .NET SDK or .NET Runtime.
There are two sections highlighted in the previous image. If you're downloading the SDK, refer to section 1. For the .NET Runtime, refer to section 2.
Section 1 (SDK)
This section is the SDK download area. Under the Installers column for the macOS row, two architectures are listed: Arm64 and x64.
If you're running an Apple processor, such as an M1 or an M3 Pro, select Arm64.
If you're running an Intel processor, select x64.
Section 2 (Runtime)
This section contains the runtime downloads. Notice that links for the Installers column in the macOS row are empty! This section is empty because the ASP.NET Core Runtime, is only provided in the SDK, or through binary installation.
Scroll further down to find the standard .NET Runtime for download.
If you're running an Apple processor, such as an M1 or an M3 Pro, select Arm64.
If you're running an Intel processor, select x64.
Once the download completes, open it.
Follow the steps in the Installer.
Install .NET manually
As an alternative to the macOS installers, you can download and manually install the SDK and runtime. Manual installation is usually performed as part automation in a continuous integration scenario. Developers and users usually want to use the installer.
The script defaults to installing the latest long term support (LTS) version, which is .NET 8. You can choose a specific release by specifying the channel switch. Include the runtime switch to install a runtime. Otherwise, the script installs the SDK.
Tip
These commands are provided a script snippet at the end of this procedure.
Open a terminal.
Navigate to a folder where you want to download the script, such as ~/Downloads.
If you don't have the wget command, install it with Brew
Bash
brew install wget
Run the following command to download the script:
Bash
wget https://dot.net/v1/dotnet-install.sh
Give the script execute permissions
Bash
chmod +x dotnet-install.sh
Run the script to install .NET.
The script defaults to installing the latest SDK to the ~/.dotnet directory.
Bash
./dotnet-install.sh
Here are all the commands as a single bash script:
Test .NET by navigating to the ~/.dotnet folder and running the dotnet --info command:
Bash
chdir ~/.dotnet
./dotnet --info
Important
Some programs might use environment variables to find .NET on your system, and using the dotnet command might not work when opening a new terminal. For help resolving this issue, see Make .NET available system-wide section.
Install .NET for Visual Studio Code
Visual Studio Code is a powerful and lightweight source code editor that runs on your desktop. Visual Studio Code can use the SDK already installed on your system. Additionally, the C# Dev Kit extension will install .NET for you if it's not already installed.
After downloading an installer or binary release, verify it to make sure that the file hasn't been changed or corrupted. You can verify the checksum on your computer and then compare it to what was reported on the download website.
When you download the file from an official download page, the checksum for the file is displayed in a text box. Select the Copy button to copy the checksum value to your clipboard.
Use the sha512sum command to print the checksum of the file you've downloaded. For example, the following command reports the checksum of the dotnet-sdk-8.0.100-linux-x64.tar.gz file:
Compare the checksum with the value provided by the download site.
Important
Even though a Linux file is shown in these examples, this information equally applies to macOS.
Use a checksum file to validate
The .NET release notes contain a link to a checksum file you can use to validate your downloaded file. The following steps describe how to download the checksum file and validate a .NET install binary:
With both the checksum file and the .NET release file downloaded to the same directory, use the sha512sum -c {file} --ignore-missing command to validate the downloaded file.
When validation passes, you see the file printed with the OK status:
Bash
$ sha512sum -c 8.0.0-sha.txt --ignore-missing
dotnet-sdk-8.0.100-linux-x64.tar.gz: OK
If you see the file marked as FAILED, the file you downloaded isn't valid and shouldn't be used.
Bash
$ sha512sum -c 8.0.0-sha.txt --ignore-missing
dotnet-sdk-8.0.100-linux-x64.tar.gz: FAILED
sha512sum: WARNING: 1 computed checksum did NOT match
sha512sum: 8.0.0-sha.txt: no file was verified
Arm-based Macs
The following sections describe things you should consider when installing .NET on an Arm-based Mac.
Path differences
On an Arm-based Mac, all Arm64 versions of .NET are installed to the normal /usr/local/share/dotnet/ folder. However, when you install the x64 version of .NET SDK, it's installed to the /usr/local/share/dotnet/x64/dotnet/ folder.
Path variables
Environment variables that add .NET to system path, such as the PATH variable, might need to be changed if you have both the x64 and Arm64 versions of the .NET SDK installed. Additionally, some tools rely on the DOTNET_ROOT environment variable, which would also need to be updated to point to the appropriate .NET SDK installation folder.
Troubleshooting
The following sections are available to help troubleshoot issues:
Sometimes apps on your system, including the terminal, need to find where .NET is installed. The .NET macOS Installer package should automatically configure your system. However, if you used the manual installation method or the .NET install script, you must add the directory where .NET was installed to the PATH variable.
Some apps might look for the DOTNET_ROOT variable when trying to determine where .NET is installed.
There are many different shells available for macOS and each has a different profile. For example:
Bash Shell: ~/.profile, /etc/profile
Korn Shell: ~/.kshrc or .profile
Z Shell: ~/.zshrc or .zprofile
Set the following two environment variables in your shell profile:
DOTNET_ROOT
This variable is set to the folder .NET was installed to, such as $HOME/.dotnet:
Bash
export DOTNET_ROOT=$HOME/.dotnet
PATH
This variable should include both the DOTNET_ROOT folder and the DOTNET_ROOT/tools folder:
Bash
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
System.Drawing.Common and libgdiplus
.NET applications that use the System.Drawing.Common assembly require libgdiplus to be installed.
An easy way to obtain libgdiplus is by using the Homebrew ("brew") package manager for macOS. After installing brew, install libgdiplus by running the following commands in the terminal:
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
.NET is a free, cross-platform, open source developer platform for building many different types of applications. With .NET, you can use multiple languages, editors, and libraries to build for web, mobile, desktop, games, and IoT.