Installing ASP.NET 5 On Windows(在Windows上安装ASP.NET 5)
本菜鸟基本是个英盲,此篇外博是我用有道翻译的,好在内容还算简单,但愿不会误人子弟。英语好的同志们可直接去看原文:https://docs.asp.net/en/latest/getting-started/installing-on-windows.html,如果有人能重新翻译发布出来让大家学习那再好不过,省得我这种人一个一个地查单词。
欢迎指正!
By Rick Anderson, Steve Smith, Daniel Roth
作者Rick Anderson, Steve Smith, Daniel Roth
This page shows you how to install ASP.NET 5 on Windows. To run ASP.NET 5 apps on IIS, seePublishing to IIS.
此篇为你介绍怎样在Windows上安装ASP.NET 5。要在IIS上运行ASP.NET 5应用,请看发布到IIS。
In this article(这篇文章分以下小节):
- Install ASP.NET 5 with Visual Studio(通过安装Visual Studio来安装ASP.NET 5)
- Install ASP.NET 5 from the command-line(使用命令行安装ASP.NET 5)
- Related Resources(相关资源)
Install ASP.NET 5 with Visual Studio(通过安装Visual Studio来安装ASP.NET 5)
The easiest way to get started building applications with ASP.NET 5 is to install the latest version of Visual Studio 2015 (including the free Community edition).
开始构建ASP.NET应用最容易的方法是安装最新版本的Visual Studio 2015(包括免费的社区版本)。
- Install(安装) Visual Studio 2015
Be sure to specify that you want to include the Microsoft Web Developer Tools.
一定要指出你想要安装Microsoft Web 开发工具。
- Install(安装) ASP.NET 5.
This will install the latest ASP.NET 5 runtime and tooling.这将会安装最新版本的ASP.NET 5 运行时和工具。
-
Enable the ASP.NET 5 command-line tools. Open a command-prompt and run(打开命令提示符并运行以下命令,使ASP.NET 5命令行工具可用):
dnvm upgrade
This will make the default .NET Execution Environment (DNX) active on the path.这将激活DNX。
- On Windows 7 and Windows Server 2008 R2 you will also need to install the Visual C++ Redistributable for Visual Studio 2012 Update 4.(在Win7或Windows server 2008 r2上,你还需要安装 Visual C++ Redistributable for Visual Studio 2012 Update 4)。
You are all set up and ready to write your first ASP.NET 5 application!
你已经搭建好环境,可以写你的首个ASP.NET 5应用!
Install ASP.NET 5 from the command-line(使用命令行安装ASP.NET 5)
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).
你可以使用命令行安装ASP.NET 5。包含一系列步骤,因为我将需要安装和设置ASP.NET运行的环境(DNX)。要安装DNX,我们需要另一个工具,.NET版本管理器(DNVM)。
Install the .NET Version Manager (DNVM)(安装.NET版本管理器DNVM)
Use .NET Version Manager to install different versions of the .NET Execution Environment (DNX).
使用DNVM来安装不同版本的DNX。
To install DNVM open a command prompt and run the following:
打开命令提示符,运行下面的代码,来安装DNVM:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"
Once this step is complete you should be able to run dnvm
and see some help text.
一旦完成此步骤你就可以运行“dnvm”并看到一些帮助文字。
Install the .NET Execution Environment (DNX)(安装DNX)
The .NET Execution Environment (DNX) is used to build and run .NET projects. Use DNVM to install DNX for the full .NET Framework or for .NET Core (see Choosing the Right .NET For You on the Server).
DNX被用来构建并运行.NET项目。使用DNVM能为全功能的.NET Framework或.NET Core安装DNX(请看为你的服务选择正确的.NET)。
To install DNX for .NET Core(为.NET Core安装DNX):
-
Use DNVM to install DNX for .NET Core(使用DNVM为.NET Core安装DNX):
dnvm upgrade -r coreclr
To install DNX for the full .NET Framework(为全功能.NET Framework安装DNX):
-
Use DNVM to install DNX for the full .NET Framework(使用DNVM为全功能.NET Framework安装DNX):
dnvm upgrade -r clr
By default DNVM will install DNX for the full .NET Framework if no runtime is specified.
默认情况下,如果没有指定运行时,DNVM将为全功能.NET Framework安装DNX。

【推荐】100%开源!大型工业跨平台软件C++源码提供,建模,组态!
【推荐】AI 的力量,开发者的翅膀:欢迎使用 AI 原生开发工具 TRAE
【推荐】2025 HarmonyOS 鸿蒙创新赛正式启动,百万大奖等你挑战
· WPF 引用 ASP.NET Core 的 AOT 版本
· 通过 Canvas 将后端发来的一帧帧图片渲染成“视频”的实现过程
· 当加密ID需要变成Guid:为什么我选择了AES-CBC而非GCM?
· 基于 epoll 的协程调度器——零基础深入浅出 C++20 协程
· 下划线字段在golang结构体中的应用
· 我的AI自学路线,可能对你有用
· WPF 引用 ASP.NET Core 的 AOT 版本
· 纯 C#实现+AOT 打造的智能PDF目录提取工具 PdfTocExtractor
· C# 13 与 .NET 9 跨平台开发实战(第一章:开发环境搭建与.NET概述-下篇)
· 记一次 .NET 某工控PCB巡检系统 崩溃分析