Here we will create an ASP.NET Core Web application with .NET 5.0 framework and project structure in Visual Studio 2019.
Create Application
Open Visual Studio 2019 and click on Create a new project, as shown below
Select ASP.NET Core Web App and click on next
Configure the Project with Project name, Location, and solution name and click on next
Select the target framework .NET 5.0 and click on Create
This will create a new ASP.NET Core Web Application, as shown below. Wait until visual studio restores the packages into the project.
The dependencies packages restore from NuGet package in to the project.
To run the application click on IIS Express or CTRL + F5. this will open in the browser as shown below
We've sucessfully created ASP.NET Core Web Application with .NET 5.0.
Project Structure
The following is the default project structure.
.csproj
.csproj file to manage project we can edit the .csproj file by right click on the project and select Edit Project File
The .csproj file contains project framework details and nuget package details and the above project .csproj file code looks like below.
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>
Dependencies
Right Click on the dependencies and click on manage NuGet Packages, select browse and search required package and install.
We can install required packages using package manager console.
Properties
The properties folder includes launchSettings.json file, in this file we can find the default applicaion lunch settings,IIS Settings and profiles.
We can customize the lunchsettings as required.
In the above article we discussed how to create an ASP.NET Core Web Application, project structure, properties, dependencies and .csproj files.