Menu
As Quora User says, yes, if it's a matter of simple drag-and-drop, as much of today's Mac software is. These can normally be run from anywhere too, so if the /Applications folder is write-protected you can drop the app somewhere else and run it fr.
-->
In this article, you'll learn how to install .NET on macOS. .NET is made up of the runtime and the SDK. The runtime is used to run a .NET app and may or may not be included with the app. The SDK is used to create .NET apps and libraries. The .NET runtime is always installed with the SDK.
The latest version of .NET is 5.0.
Supported releases
The following table is a list of currently supported .NET releases and the versions of macOS they're supported on. These versions remain supported either the version of .NET reaches end-of-support.
Unsupported releases
The following versions of .NET are ❌ no longer supported. The downloads for these still remain published:
Runtime information
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 runtime.
There are three different runtimes you can install on macOS:
ASP.NET Core runtime
Runs ASP.NET Core apps. Includes the .NET runtime.
.NET runtime
This runtime is the simplest runtime and doesn't include any other runtime. It's highly recommended that you install ASP.NET Core runtime for the best compatibility with .NET apps. SDK information
How to enable allow apps from unknown sources mac. The SDK is used to build and publish .NET apps and libraries. Installing the SDK includes both runtimes: ASP.NET Core and .NET.
Dependencies
.NET is supported on the following macOS releases:
Beginning with macOS Catalina (version 10.15), all software built after June 1, 2019 that is distributed with Developer ID, must be notarized. This requirement applies to the .NET runtime, .NET SDK, and software created with .NET.
Mac catalina app compatibility. The runtime and SDK installers for .NET 5.0 and .NET Core 3.1, 3.0, and 2.1, have been notarized since February 18, 2020. Prior released versions aren't notarized. If you run a non-notarized app, you'll see an error similar to the following image:
For more information about how enforced-notarization affects .NET (and your .NET apps), see Working with macOS Catalina Notarization.
libgdiplus
.NET applications that use the System.Drawing.Common assembly require libgdiplus to be installed. Best mac alarm clock app.
An easy way to obtain libgdiplus is by using the Homebrew ('brew') package manager for macOS. After installing brew, install libgdiplus by executing the following commands at a Terminal (command) prompt:
Install with an installer
macOS has standalone installers that can be used to install the .NET 5.0 SDK:
Download and manually install
As an alternative to the macOS installers for .NET, you can download and manually install the SDK and runtime. Manual install is usually performed as part of continuous integration testing. For a developer or user, it's generally better to use an installer.
If you install .NET SDK, you don't need to install the corresponding runtime. First, download a binary release for either the SDK or the runtime from one of the following sites:
Next, extract the downloaded file and use the
export command to set variables used by .NET and then ensure .NET is in PATH.
To extract the runtime and make the .NET CLI commands available at the terminal, first download a .NET binary release. Then, open a terminal and run the following commands from the directory where the file was saved. The archive file name may be different depending on what you downloaded.
Use the following command to extract the runtime:
Use the following command to extract the SDK:
Tip
The preceding
export commands only make the .NET CLI commands available for the terminal session in which it was run.
You can edit your shell profile to permanently add the commands. There are a number of different shells available for Linux and each has a different profile. For example:
Edit the appropriate source file for your shell and add
:$HOME/dotnet to the end of the existing PATH statement. If no PATH statement is included, add a new line with export PATH=$PATH:$HOME/dotnet .
Also, add
export DOTNET_ROOT=$HOME/dotnet to the end of the file.
This approach lets you install different versions into separate locations and choose explicitly which one to use by which application.
Install with Visual Studio for Mac
Visual Studio for Mac installs the .NET SDK when the .NET workload is selected. To get started with .NET development on macOS, see Install Visual Studio 2019 for Mac.
Install alongside Visual Studio CodeMacos App Installed With Different Username
Visual Studio Code is a powerful and lightweight source code editor that runs on your desktop. Visual Studio Code is available for Windows, macOS, and Linux.
While Visual Studio Code doesn't come with an automated .NET installer like Visual Studio does, adding .NET support is simple.
Install with bash automation
The dotnet-install scripts are used for automation and non-admin installs of the runtime. You can download the script from the dotnet-install script reference page.
The script defaults to installing the latest long term support (LTS) version, which is .NET 5.0. You can choose a specific release by specifying the
current switch. Include the runtime switch to install a runtime. Otherwise, the script installs the SDK.
Note
![]()
The previous command installs the ASP.NET Core runtime for maximum compatability. The ASP.NET Core runtime also includes the standard .NET runtime.
Docker
Containers provide a lightweight way to isolate your application from the rest of the host system. Containers on the same machine share just the kernel and use resources given to your application.
.NET can run in a Docker container. Official .NET Docker images are published to the Microsoft Container Registry (MCR) and are discoverable at the Microsoft .NET Core Docker Hub repository. Each repository contains images for different combinations of the .NET (SDK or Runtime) and OS that you can use.
Microsoft provides images that are tailored for specific scenarios. For example, the ASP.NET Core repository provides images that are built for running ASP.NET Core apps in production.
For more information about using .NET Core in a Docker container, see Introduction to .NET and Docker and Samples.
Next steps
Reinstall from macOS Recovery
macOS Recovery makes it easy to reinstall the Mac operating system, even if you need to erase your startup disk first. All you need is a connection to the Internet. If a wireless network is available, you can choose it from the Wi-Fi menu , which is also available in macOS Recovery.
1. Start up from macOS Recovery
To start up from macOS Recovery, turn on your Mac and immediately press and hold one of the following sets of keys on your keyboard. Release the keys when you see an Apple logo, spinning globe, or other startup screen.
Command (⌘)-R
Reinstall the latest macOS that was installed on your Mac (recommended).
Option-⌘-R
Upgrade to the latest macOS that is compatible with your Mac.
Shift-Option-⌘-R
Reinstall the macOS that came with your Mac, or the closest version still available.
Google meeting mac app.
You might be prompted to enter a password, such as a firmware password or the password of a user who is an administrator of this Mac. Enter the requested password to continue.
When you see the utilities window, you have started up from macOS Recovery.
2. Decide whether to erase (format) your disk
You probably don't need to erase, unless you're selling, trading in, or giving away your Mac, or you have an issue that requires you to erase. If you need to erase before installing macOS, select Disk Utility from the Utilities window, then click Continue. Learn more about when and how to erase.
3. Install macOS
When you're ready to reinstall macOS, choose Reinstall macOS from the Utilities window. Then click Continue and follow the onscreen instructions. You will be asked to choose a disk on which to install.
Please allow installation to complete without putting your Mac to sleep or closing its lid. During installation, your Mac might restart and show a progress bar several times, and the screen might be empty for minutes at a time.
If your Mac restarts to a setup assistant, but you're selling, trading in, or giving away your Mac, press Command-Q to quit the assistant without completing setup. Then click Shut Down. When the new owner starts up the Mac, they can use their own information to complete setup.
macOS Recovery exceptions
The version of macOS offered by macOS Recovery might vary in some cases:
If you can't get macOS Recovery to offer the installer you want, you might be able to use one of the other ways to install macOS.
Other ways to install macOSMacos App Installed With Different Users![]() Macos User Guide
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |