如何创建基于.NET的核心,而不是完整的框架一个ASP.NET项目?而不是、框架、核心、完整

由网友(女汉子/萌妹子)分享简介:我听到了几个月后,阅读所有关于.NET的核心。我的Visual Studio 2015年,所以我想我会尝试一下。我去到文件 - 新建项目,选择ASP.NET Web应用程序,看看我只能选择一个版本的完整的.NET框架(如4.6)。 如何创建基于.NET的核心一个ASP.NET项目,而不是完整的框架? I was re...

我听到了几个月后,阅读所有关于.NET的核心。我的Visual Studio 2015年,所以我想我会尝试一下。我去到文件 - 新建项目,选择ASP.NET Web应用程序,看看我只能选择一个版本的完整的.NET框架(如4.6)。 如何创建基于.NET的核心一个ASP.NET项目,而不是完整的框架?

I was reading all about .NET Core after hearing about it for months. I got Visual Studio 2015, so I thought I would try it out. I go into File - New Project, choose ASP.NET Web Application, and see I can only choose a version of the full .NET Framework (such as 4.6). How do I create a ASP.NET project based on the .NET Core, not on the full Framework?

我以为会有一些教程这个,但我找不到任何。我看到的是基于完整的框架。

I thought there would be some tutorials on this, but I can't find any. All I see is based on the full Framework.

推荐答案

ASP.NET 5.0核心beta5的随VS 2015年RTM。 Beta6 刚刚运和用于升级VS 2015年(阅读安装说明!)

ASP.NET 5.0 Core beta5 shipped with VS 2015 RTM. Beta6 just shipped and be used to upgrade VS 2015. (Read the Install Instructions!)

当您从ASP.NET 5 preVIEW模板之一(​​空,Web API或Web应用程序),它被设置为编译的两个的核心和4.5.1创建项目框架版本每次构建的时间。

When you create a project from one of the ASP.NET 5 Preview Templates (Empty, Web API, or Web Application) it is set up to compile both Core and 4.5.1 Framework versions every time you build.

要改变这种打造的唯一的核心的,请执行以下操作:

To change this to build only Core, do the following:

在项目/属性/应用:改变从.NET平台 框架.NET核心 开启project.json并找到框架一节。删除 dnx451:{},然后保存 在建立 Project / Properties / Application: change Platform from .NET Framework to .NET Core Open project.json and find the "frameworks" section. Delete "dnx451": {}, and save. Build

您现在在CoreCLR运行。

You are now running on the CoreCLR.

阅读全文

相关推荐

最新文章