In this session we are going to talk about the structure of Project file, in different types of ASP.NET application. We show you the structure of Project file in ASP.NET Framework 4.x, ASP.NET Core, ASP.NET 5.0 and talk about how to update this file as well. Based on our application target framework, in Project file inside this block
<TargetFramework></TargetFramework> you can see Target Framework Moniker(TFM). Below chart presents abbreviation and TFM (Target Framework Moniker) of different ASP.NET versions.
ASP.NET Framework 4.7.2 Project file
In previous versions of ASP.NET, in order to visit and edit the Project file, first you had to Unload the project. For this purpose, you should right click on project in Solution Explorer, then select Unload the project. After Unloading the project, you can edit the Project file with right click on considered project in Solution explorer and select Edit Project File. In the following image, you can see a part of Project file including TargetFrameworkVersion.
As you see in above chart, in ASP.NET Framework 4.x Project file, the version of framework has been mentioned in respective Tag. In this type of project, it is not possible to Delete or Add file or folder through File Explorer directly. We will explain more about this, in this session video tutorial.
ASP.NET Core 3.1 and ASP.NET 5.0 Project file
Generally in ASP.NET Core and ASP.NET 5.0, there is no need to Unload the project to edit its Project file. We can edit the Project file by right clicking on project in Solution Explorer then select Edit Project File directly. Project file extensions varied according to different programming language. For example, if you choose C#, the Project file extension will be csproj but, by choosing Visual Basic as a programming language, the Project file extension will be vbproj. In below image, you see the Project file of ASP.NET 5.0 and ASP.NET Core 3.1 framework.
As you see, the structure of Project file in ASP.NET Core 3.1 and ASP.NET 5.0 framework is similar to each other and according to chart, the TFM is mentioned in the Project file. Also this file has less details comparing to previous versions of ASP.NET version Project file. Files, folders and structure has not been referenced in this version of ASP.NET Project file. In Project file in addition to TFM, installed packages of each application mention in
<ItemGroup></ItemGroup>, but as we have not added any packages in our project yet, we have nothing in this part right now.
Other option of this framework is possibility of Add and Delete files and folders directly in project by means of File Explorer.
You can download this Session Slides form HERE