Create ASP.NET Core Application

Here, we will learn how to create our first ASP.NET Core 3.0 application in Visual Studio 2019.

Open Visual Studio 2019 and click on Create a new project, as shown below.

Create a New ASP.NET Core 3.0 Project

The "Create a new project" dialog box includes different .NET Core 3.0 application templates. Each will create predefined project files and folders depends on the application type. Here we will create a simple web application, so select ASP.NET Core Web Application template and click Next, as shown below.

Select Application Template

Next, give the appropriate name, location, and the solution name for the ASP.NET Core application. In this example, we will give the name "MyFirstCoreWebApp" and click on the Create button, as shown below.

Configure Project

Next, select appropriate ASP.NET Core Web application template such as Empty, API, Web Application, MVC, etc. Here, we want to create a web application, so select the Web Application template. We don't want HTTPS at this point, so uncheck Configure for HTTPS checkbox, as shown below. Also, make sure you have selected the appropriate .NET Core and ASP.NET Core versions. Click on the Create button to create a project.

Select Web Application Template

This will create a new ASP.NET Core web project in Visual Studio 2019, as shown below. Wait for some time till Visual Studio restores the packages in the project. Restoring process means Visual Studio will automatically add, update or delete configured dependencies as NuGet packages in the project.

Create ASP.NET Core 3 Application

We will understand the project structure in the next chapter. To run this web application, click on IIS Express or press Ctrl + F5. This will open the browser and display the following result.

The above output comes from the Index.cshtml page under the Pages folder.

You can also see the IIS express icon on the system tray. Right click on it. You can see the ASP.NET sites currently running in your development machine.

ASP.NET Core sites in System Tray

Thus, we can create a new cross-platform ASP.NET Core 3.0 application that runs on .NET Core.

Learn about the project structure next.