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

编程入门 行业动态 更新时间:2024-10-23 13:26:00
本文介绍了如何创建基于.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?

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

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.

更多推荐

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

本文发布于:2023-11-17 06:56:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1609223.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:而不是   框架   核心   完整   项目

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!