
Creating your first ASP.NET Core 2.0 application in Visual Studio 2017
You have patiently read the previous chapters, understood what you will be learning by reading this book, and prepared your developer machine. You are now ready to create your first sample application.
Let's look at the different options you have for creating your first ASP.NET Core 2.0 application in more detail.
When creating a new project in Visual Studio 2017, the first thing you see is the template explorer displaying a tree view for choosing between installed, language-specific, and online templates.
After having selected the template source in the tree view, the different templates are shown. For ASP.NET Core, you see Console App, Class Library, Unit Test Project, xUnit Test Project, and ASP.NET Core Web Application (.NET Core), for example.
Since some of the templates integrate multiple application types, you sometimes have to make additional choices to specify what exact type of application you want to create. This is the case for ASP.NET Core web applications, since you have to choose between an empty, Web API, Web Application, or Web Application (Razor Pages) project template. Additionally, you can enable Docker support and change the authentication mode between no authentication, an inpidual user account, a work or school account, or Windows authentication.
The following are step-by-step instructions for creating your first ASP.NET Core 2.0 sample web application:
- If the .NET Core 2.0 SDK is not yet installed, then download and install .NET Core Preview 2 from https://www.microsoft.com/net/core/preview.
Note that this step might no longer be needed at the time of reading this book, since it should have been released officially by then.
- Start Visual Studio 2017.
- Create a new project by clicking on File | New | Project:

- Select as project template Visual C# | .NET Core | ASP.NET Core Web Application (.NET Core):

- You are now able to select the specific web application type. Select Web Application (Razor Pages) and leave the Docker support (disabled) and authentication (No Authentication) options unchanged:

Note that at the time of the elaboration of this book, only Visual Studio 2017 Preview 15.3 had support for ASP.NET Core 2.0. It should be included in the standard version, though, and at the time of publication.
- After the sample application project has been generated, a project start page is displayed. Here, you can configure additional options such as connected services (Application Insights, and more) and publishing targets (Microsoft Azure App Services, IIS, FTP, Folder, and more). Leave everything unchanged:

- You can now start debugging your application by pressing F5 or by clicking on Debug | Start Debugging:
