Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 483
Patrick Szalapski Avatar asked Jul 28 '15 21:07

Patrick Szalapski


People also ask

Can I use .NET Core instead of .NET Framework?

ASP.NET Web Forms applications: ASP.NET Web Forms are only available in . NET Framework. ASP.NET Core cannot be used for ASP.NET Web Forms.

Can you mix .NET Core and .NET Framework?

At this point, if your NuGet dependencies are compatible with both your netcore and netframework targets you may be done! The big news here is that most of your NuGet dependencies are compatible with both. All of the most downloaded NuGet packages are either multi-targeted, or have packages for each target.

Does .NET Core support all the .NET Framework app models?

. Net Core does not support desktop application development and it rather focuses on the web, windows mobile, and windows store. . Net Framework is used for the development of both desktop and web applications as well as it supports windows forms and WPF applications.

How to create a simple ASP NET Core website?

Here are the steps to create a simple asp.net core website. Open Visual Studio, here I am using Visual Studio 2019. Search for the asp.net core web application, select it and click on the next button. On the next screen you will need to insert few details, including your project name, your project location and solution name.

How do I use Visual Studio with ASP NET Core?

In this tutorial for C# development with ASP.NET Core using Visual Studio, you'll create a C# ASP.NET Core web app, make changes to it, explore some features of the IDE, and then run the app. If you haven't already installed Visual Studio, go to the Visual Studio downloads page to install it for free.

What is the difference between ASP and ASP NET Core?

ASP.NET Core Web Application (.NET Core) − This will start you with a crossplatform compatible project that runs on the .NET Core framework. ASP.NET Core Web Application (.NET Framework) − This starts a new project that runs on the standard .NET Framework on Windows.

What platforms can I run ASP NET Core on?

ASP.NET Core apps can run on either .NET Core or the .NET Framework. You can develop and run your ASP.NET Core apps cross-platform on Windows, Mac, and Linux.


2 Answers

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.

like image 92
Van Kichline Avatar answered Oct 19 '22 20:10

Van Kichline


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

like image 34
Kritner Avatar answered Oct 19 '22 19:10

Kritner