Installing ASP.NET 5 On Mac OS X¶
The easiest way to get started building applications with ASP.NET 5 is to install the latest version of Visual Studio Code.
- Install Mono for OS X (required by Visual Studio Code).
- Install Visual Studio Code
- Install ASP.NET 5 for Mac OS X
You are all set up and ready to write your first ASP.NET 5 application on a Mac!
You can also install ASP.NET 5 from the command-line. There are a few steps involved, since we’ll need to install and configure the environment in which ASP.NET runs, the .NET Execution Environment (DNX). To install DNX, we need one more tool, the .NET Version Manager (DNVM).
Install the .NET Version Manager (DNVM)¶
To install DNVM:
Run the following
curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh
dnvm listto show the DNX versions installed
dnvmto get DNVM help
The .NET Version Manager (DNVM) is used to install different versions of the .NET Execution Environment (DNX) on OS X.
Install the .NET Execution Environment (DNX)¶
To install DNX for .NET Core:
Use DNVM to install DNX for .NET Core:
dnvm upgrade -r coreclr
To install DNX for Mono:
Use DNVM to install DNX for Mono:
dnvm upgrade -r mono
By default DNVM will install DNX for Mono if no runtime is specified.
Restoring packages using DNX on Mono may fail with multiple canceled requests. You may be able to work around this issue by setting
MONO_THREADS_PER_CPU to a larger number (2000).