Patrick Szalapski
Patrick Szalapski

Reputation: 9439

How do I create a ASP.NET project based on the .NET Core, not on the full Framework?

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.

Upvotes: 8

Views: 4502

Answers (2)

Kritner
Kritner

Reputation: 13765

You can find the .net core and nightly builds at:

https://github.com/dotnet/core

https://github.com/dotnet/coreclr

Thanks for the comments and whatnot guys... Can't delete my answer since it's accepted, so here's some screenshots showing how to get to the new template. Note that the new framework version is not listed where you (at least I) would expect. You can choose the asp.net 5 tempate after you actually choose to create a web application in one of the (non 5.0) framework templates.

VS version

No Preview templates

Not on framework list

I stand corrected :P

Upvotes: 1

Van Kichline
Van Kichline

Reputation: 1713

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!)

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:

  • Project / Properties / Application: change Platform from .NET Framework to .NET Core
  • Open project.json and find the "frameworks" section. Delete "dnx451": {}, and save.
  • Build

You are now running on the CoreCLR.

Upvotes: 7

Related Questions