Wednesday, October 16, 2019

How Asp.net core is Different From ASP.NET | asp.net core 2.0 project structure | part-2

Hello & As-salam u alikum ! , In this article we will learn about Folder ,File  or Project Structure in asp.net core

If you have ever worked on older versions of ASP.NET  or .net framework using C# ,then you might be surely know that the project file extension is ".csproj" ,Similarly if you used to code in VB. net , then your project file extension was used to be ".vbproj" , But in asp.net core these concepts has been changed .


File and Folder References:
The ASP.NET Core Project File does not contain any references for folder or file. In previous versions of ASP.NET Framework, when we add a folder or a file to the project using Solution Explorer, then a reference to that folder or file is added in the project file. But with ASP.NET Core, the Project File does not include any reference for the Files or Folders added the project using Solution Explorer  

ASP.net Core Project File:

Right Click on the Project and Select Edit Project File.









TargetFramework: 
The TargetFramework element in the project file is used to specify the target framework for your application. To specify the target framework in the project file we are using something called Target Framework Moniker (TFM).
In our example, the application targets the framework netcoreapp2.2. The netcoreapp2.2 is the Moniker for .NET Core 2.2. If you remember, while we are creating this project, we select .NET Core 2.2 as the target framework.




AspNetCoreHostingModel: 
The AspNetCoreHostingModel element of the project file is used to specify how we are going to host the asp.net core application. Values for this AspNetCoreHostingModel element are either InProcess or OutOfProcess.
The value InProcess specifies that we are going to use the in-process hosting model for our application. It means we are going to host the ASP.NET Core Application inside of the IIS Worker Process which is nothing but w3wp.exe.

The value OutOfProcess specifies that we are going to use the out-of-process hosting model. In a later article, we will discuss the In Process and Out Of Process hosting model in detail.


Microsoft.AspNetCore.App: 
Microsoft.AspNetCore.App NuGet package is generally called the Meta Package. The Meta Package has not any content of its own but it contains a list of dependencies i.e. it contains other packages.
You can find this Meta Package, in the Solution Explorer, under NuGet which is present inside the Dependencies. When you expand the Meta Package, then you will find all the dependencies

Thank you for reading ,Have a good day ! In the next article we will Learn about Main method in asp.net core and In process Hosting & out process hosting


0 Comments:

Post a Comment

Do not Add Spam links in the Comment Box

Subscribe to Post Comments [Atom]

<< Home