Creating your first app

Run the following command to create a new console app from a template:

dotnet new console -o DotNetCoreTwoHelloWorld

Then switch to the directory that was just created and run it with these two commands:

cd DotNetCoreTwoHelloWorlddotnet run

Your console should look something like the following screenshot (if you're using PuTTY on Windows):

With .NET Core 1.0, you needed to call dotnet restore before building or running your application with the dotnet command. In .NET Core 2.0, this is called on your behalf for dotnet commands that require it, and you no longer need to restore NuGet packages manually this way.

Assuming ...

Get ASP.NET Core 2 High Performance - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.