How to do it...

After installing .NET Core on Linux, creating a new project is easy.

Let's start creating a new project:

  1. Run dotnet new mvc from the command line. This command will create a new ASP.NET Core MVC project with the same name as the containing folder. If we want to give a different name to the project, -n PROJECTNAME switch should be added
  1. Next, we need to run dotnet restore in the project folder. Most IDEs run dotnet restore in the background for us, such as Visual Studio and Visual Studio Code

Get ASP.NET Core MVC 2.0 Cookbook 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.