如何创建基于.NET的核心,而不是完整的框架一个ASP.NET项目? [英] How do I create a ASP.NET project based on the .NET Core, not on the full Framework?

查看:242
本文介绍了如何创建基于.NET的核心,而不是完整的框架一个ASP.NET项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听到了几个月后,阅读所有关于.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?

我以为会有<一个href="http://www.bing.com/search?q=create%20%20%22.net%20core%22%20asp.net%20project%20%22visual%20studio%202015%22&qs=n&form=QBRE&pq=create%20%22.net%20core%22%20asp.net%20project%20%22visual%20studio%202015%22&sc=0-0&sp=-1&sk=&cvid=b8625d064ed74284a2d102d6eccca5af"相对=nofollow>一些教程<一href="https://www.google.com/search?num=100&site=&source=hp&q=create%20%20%22.net%20core%22%20asp.net%20project%20%22visual%20studio%202015%22&oq=create%20%20%22.net%20core%22%20asp.net%20project%20%22visual%20studio%202015%22&gs_l=hp.3...2099.2099.0.2380.2.2.0.0.0.0.358.489.0j1j0j1.2.0....0...1c.1.64.hp..2.0.0.0.OFIXnZEFzWA"相对=nofollow>这个,但我找不到任何。我看到的是基于完整的框架。

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。 <一href="https://www.microsoft.com/en-us/download/details.aspx?id=48222&WT.mc_id=rss_alldownloads_all"相对=nofollow> 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.

这篇关于如何创建基于.NET的核心,而不是完整的框架一个ASP.NET项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆