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.
Open the project folder in VS Code. Wait for the C# extension to prompt you to add required assets for build and debug, and choose Yes. You can also open the Command Palette (Ctrl+Shift+P) and use the . NET: Generate Assets for Build and Debug command.
NET Core can be installed in two ways: By installing Visual Studio 2017/2019 or by installing . NET Core Runtime or SDK. . NET Core installer already contains ASP.NET Core libraries, so there is no separate installer for ASP.NET Core.
.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:
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:
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With