January 7, 2021
This is the most important file in our application. It tells .NET how to build the project.

All .NET projects list their dependencies in the .csproj file. If you have worked with JavaScript before, think of it like a package.json file. The difference is, instead of a JSON, this is an XML file. When you run dotnet restore, it uses this file to figure out which NuGet packages to download and copy to the project folder.

The .csproj file also contains all the information that .NET tooling needs to build the project. It includes the type of the project being built (console, web, desktop, etc.), the platform this project targets and any dependencies on other projects or 3rd party libraries.

Starting in .NET 5, there have been a few major changes to make this file easier to read and maintain. For example, in the older versions of .NET, every file and path to the DLL references in the project had to be listed in the .csproj file. Now they are automatically included and compiled. 
<!-- Sdk attribute specifies the type of project, which is web. -->
<Project Sdk="Microsoft.NET.Sdk.Web"> 
    <!-- TargetFramework is the framework this project will be using, which in thi
    <!-- PackageReference references the NuGet packages. -->
    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />       
Note: If you are using Visual Studio, this file will be hidden, but you can right-click on the project and choose edit the project file.