How do I actually create a .NET Core project in Visual Studio?

20,791

.NET Core templates are available in Visual Studio 2017. When installing VS2017, you have to pick the ".NET Core cross-platform development" workload. Once you do, you'll have access to the templates:

  1. Click File - New Project.
  2. Expand Visual C# - .NET Core on the left side.
  3. Pick one of the templates.

.NET Core templates in Visual Studio 2017


If you're on Visual Studio 2015, make sure you install Update 3 (or later) and the .NET Core SDK. Then the templates will show up in New Project:

New .NET Core Project in Visual Studio 2015


It's also possible to scaffold new applications on the command line, using either dotnet new (included with the .NET Core SDK), or yo aspnet:

# Create a new console app
dotnet new

# Create a new web (ASP.NET Core) application
dotnet new -t web

# Use generator-aspnet via yeoman
yo aspnet
Share:
20,791
Brandon
Author by

Brandon

Check out my 'Dust' Visual Studio Style -> https://studiostyl.es/schemes/dust A goldmine: Hidden Features of C#?

Updated on March 07, 2020

Comments

  • Brandon
    Brandon about 4 years

    Maybe this is super obvious and I just can't find it but how can I create a .NET Core project in Visual Studio (2015 or, preferably, 2013)? I just want to run a console application on a Linux machine. The documentation at on the .NET Core github page is incomplete and anything from Microsoft provides little-to-no help.

    Bonus points if you can also tell me an easier way to run the application from my Linux command line other than dotnet run while sitting in the directory of the application.