ASP.NET 5 运行在包括OS X的可用于多个平台的.NET Execution
Environment上。本文介绍如何在OS X上通过HomeBrew安装DNX和ASP.NET 5。

本文是按照英文原文:Installing ASP.NET 5 On Mac
OS安装时遇到的问题的总结Blog。

本文是按照英文原文:Installing ASP.NET 5 On Mac
OS安装时遇到的问题的总结Blog。

本文包括:

原文提示如下:

原文提示如下:

  • 在OS X上安装ASP.NET

Installing ASP.NET 5 On Mac OS X

Installing ASP.NET 5 On Mac OS X
By Steve Smith

在OS X上安装ASP.NET

ASP.NET 5需要安装和配置ASP.NET的运行环境,称为.NET Execution
Environment。DNVM可以通过一个叫做Homebrew的工具来简单的完成安装,这个工具也可以为OS
X安装正确版本的Mono。

By Steve Smith

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

安装Homebrew

如果没有安装过Homebrew的话,可以通过如下命令行脚本完成安装:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

安装程序会在每步安装前提示你,你可以点击这里学习更多关于Homebrew的知识。

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

In this article:
Install ASP.NET 5 on OS X
Install ASP.NET 5 on OS X
ASP.NET 5 requires DNX, which is installed and managed by the .NET
Version Manager (DNVM). The DNVM is easily installed using a tool called
Homebrew, which will also install the correct version of Mono for OS
X.

安装.NET Version Manager

安装好Homebrew后,在控制台窗口运行

brew tap aspnet/dnx

来安装DNVM。如果你需要升级DNVM的版本,先运行

brew untap aspnet/dnx

以删除旧的命令,然后运行

brew tap aspnet/dnx

命令重新得到升级脚本。

如果你安装有旧的版本的Homebrew,“tap” 配置可能会得到如下错误:

Could`not create link for aspnet/dnx/kvm, as it conflicts with `aspnet/k/kvm

解决办法是:
运行

brew uninstall kvm

确保旧版本的kvm被移除,然后运行

brew untap aspnet/k

移除就的tap,最后运行

brew tap aspnet/dnx

命令成功完成安装。

然后运行

brew install dnvm

命令安装.NET Version
Manager。命令也将会从

然后运行dnvm确认是否安装正确。如果没有,运行source
dnvm.sh命令,并且再次运行dnvm。你应该会看到类似下图的信息:

图片 1

通过DNVM安装最新版本的DNX,运行:

dnvm upgrade

现在dnx安装完毕,你可以开始使用ASP.NET 5了。了解如何创建一个跨平台控制台应用程序或简单的ASP.NET
MVC应用程序并且在DNX下运行。

In this article:

Install Homebrew
The first step is to install Homebrew if it’s not already installed.
This can be done from a Terminal prompt using this script:

总结

ASP.NET 5 是建立在一个可以安装在OS X,Linux和Windows的跨平台的.NET
运行环境下的。在OS X上安装DNX和ASP.NET 5 仅仅需要几分钟和几个命令。

原文地址:

Install ASP.NET 5 on OS X

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install ASP.NET 5 on OS X

The installer will inform you of the steps it is taking and pause before
proceeding. You can learn more about Homebrew here.

ASP.NET 5 requires DNX, which is installed and managed by the .NET
Version Manager (DNVM). The DNVM is easily installed using a tool called
Homebrew, which will also install the correct version of Mono for OS X.

到这一步,可能会出现 brew 已经安装了。
图片 2

Install Homebrew

可以执行:

The first step is to install Homebrew if it’s not already installed.
This can be done from a Terminal prompt using this script:

brew -v

发表评论

电子邮件地址不会被公开。 必填项已用*标注