Creating an application in Windows through Visual Studio 2017 version 15.3

For this, we need to perform the following steps:

  1. Open Visual Studio 2017.
  2. Go to File | New | Project. In the New Project dialog, you should see the .NET Core template inside Visual C#:
  1. Click on .NET Core and select ASP.NET Core Web Application.
  2. Name the project HelloDotNetCore2 and click OK.
  1. It will show a New ASP.NET Core Web Application dialog. Ensure .NET Core and ASP.NET Core 2.0 are selected in the two dropdowns displayed in this dialog, as we are discussing .NET Core 2.0 here. The first dropdown signifies the target framework of the application and the second dropdown is the version of ASP.NET Core that we are using. You have the option to choose .NET Framework as the target framework in the first dropdown, but then the resulting application would not be cross-platform. If the application has to be cross-platform, it should target .NET Core. The second dropdown has the different versions of ASP.NET Core that have been released so far, such as 1.0, 1.1, and 2.0. We will keep it as ASP.NET Core 2.0. You will also notice that with ASP.NET Core 2.0, the number of templates has increased from the previous version. Apart from Empty, Web API, and Web Application, which were present in ASP.NET 1.1, we also have templates for Web Application (Model-View-Controller),  Angular, React.js, and React.js and Redux. We will choose Web Application (Model-View-Controller) as our template. There is support for a Docker container but let's keep it unchecked for the time being. We will discuss Docker in detail in a later chapter. Also, keep the Authentication as No Authentication. We will explore authentication options in detail in a later chapter. Click OK:
  1. And voila! Visual Studio creates the HelloDotNetCore2 project for us and restores the required packages to build in the background. You can check this by inspecting the Package Manager Console output. Your very first ASP.NET Core 2.0 is ready to be run:
  1. Click Debug or press F5 to run the application. We will see a detailed walk- through of all the project artifacts in the next chapter.