AspNetCore.Docs/aspnet/getting-started/installing-on-mac.rst

58 lines
2.4 KiB
ReStructuredText
Raw Normal View History

2015-04-18 02:23:47 +08:00
Installing ASP.NET 5 On Mac OS X
================================
2015-09-19 05:21:11 +08:00
By `Steve Smith`_, `Daniel Roth`_
2015-04-18 02:23:47 +08:00
ASP.NET 5 runs on the .NET Execution Environment (DNX), which is available on multiple platforms, including OS X. This article describes how to install DNX, and therefore ASP.NET 5, on OS X using .NET Core and Mono.
2015-04-18 02:23:47 +08:00
In this article:
- `Install the .NET Version Manager (DNVM)`_
- `Install the .NET Execution Environment (DNX)`_
2015-04-18 02:23:47 +08:00
Install the .NET Version Manager (DNVM)
---------------------------------------
2015-04-18 02:23:47 +08:00
Use the .NET Version Manager (DNVM) to install different versions of the .NET Execution Environment (DNX) on OS X.
2015-04-18 02:23:47 +08:00
To install DNVM run the following::
2015-04-18 02:23:47 +08:00
curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh
Once this step is complete you should be able to run ``dnvm`` and see some help text.
2015-04-18 02:23:47 +08:00
Install the .NET Execution Environment (DNX)
2015-09-19 05:21:11 +08:00
--------------------------------------------
2015-04-18 02:23:47 +08:00
2015-09-19 05:21:11 +08:00
The .NET Execution Environment (DNX) is used to build and run .NET projects. Use DNVM to install DNX for `Mono <http://mono-project.com>`_ or .NET Core (see :doc:`choosing-the-right-dotnet`).
2015-04-18 02:23:47 +08:00
2015-09-19 05:21:11 +08:00
**To install DNX for .NET Core:**
1. Use DNVM to install DNX for .NET Core::
2015-04-18 02:23:47 +08:00
dnvm upgrade -r coreclr
2015-04-18 02:23:47 +08:00
2015-09-03 06:25:40 +08:00
.. note:: .NET Core on OS X is still in early preview. Please refer to the latest `Release Notes <https://github.com/aspnet/home/releases>`__ for known issues and limitations.
2015-04-18 02:23:47 +08:00
2015-09-19 05:21:11 +08:00
**To install DNX for Mono:**
2015-09-19 05:21:11 +08:00
1. Install `Mono <http://www.mono-project.com/docs/getting-started/install/mac/>`__ for OS X. Alternatively you can install Mono via `Homebrew <http://brew.sh/>`__.
2015-04-21 05:18:54 +08:00
2015-09-19 05:21:11 +08:00
2. Use DNVM to install DNX for Mono::
2015-04-18 02:23:47 +08:00
2015-09-19 05:21:11 +08:00
dnvm upgrade -r mono
2015-09-19 05:21:11 +08:00
By default DNVM will install DNX for Mono if no runtime is specified.
2015-04-21 05:18:54 +08:00
2015-09-19 05:21:11 +08:00
.. note:: 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 (ex. 2000).
2015-04-18 02:23:47 +08:00
Summary
-------
2015-04-18 02:23:47 +08:00
2015-09-19 05:21:11 +08:00
ASP.NET 5 is built on the cross-platform .NET Execution Environment (DNX), which can be installed on OS X as well as :doc:`Linux <installing-on-linux>` and :doc:`Windows <installing-on-windows>`. Installing DNX and ASP.NET 5 on OS X takes just a few minutes, using a few simple commands. You're now ready to build :doc:`your first ASP.NET application </tutorials/your-first-mac-aspnet>`!
2015-04-18 02:23:47 +08:00
Related Resources
-----------------
2015-04-18 02:23:47 +08:00
- :doc:`/tutorials/your-first-mac-aspnet`
2015-09-19 05:21:11 +08:00
- :doc:`/fundamentals/index`