Let’s understand with a diagram.

From the above diagram, we can see that ASP.NET has two variations, one is .NET framework which is now updated to 4.6 or later. In this framework, we can create Windows based applications, ASP.NET Web forms, and Web API. The other one is newly created web source which is .NET Core that runs and can develop cross platform applications which include Windows, Mac, and Linux.
In the above diagram, .NET Core has again two variations on which we can run our apps by targeting .NET Core and .NET Framework. As .NET Core is in the initial stage (not fully matured), it doesn’t have all the features of .NET Framework.
Let’s differentiate both, .NET Framework and .NET Core.
| .NET Framework | .NET Core |
| Built on .NET Framework run time | Built on .NET Core and .NET Framework |
| Developed and run on Windows Platform only | Developed and run on Cross platform |
| MVC,WebAPI,SignalR,Dependency Injection supported | Built in Dependency Injection |
| MVC and WebAPI controllers are separated | MVC and WebAPI controllers are unified, inherited from same base class. |
| No new tooling | New tooling tools (Bower, grunt, and gulp) are introduced |
Let's get started with .NET Core. First, you need to install Visual Studio 2015 with Updates 3. You can download it from here. After that, download the .NET Core SDK which you can download from here. Install VS and .NET Core SDK on your PC/Laptop .
Now, let's create a simple project.

Click OK and let's choose and Empty template.

Click on OK. Our sample demo will be created.

Now, in our solution folder, we have two folders which are Solution Items and Src. Let's try to understand each of them one by one.

In Solution Items folder, there is a file, global.json, which contains the following code.

Explanation
"projects": [ "src", "test" ] : This is an array which specifies the list of projects which are included in the solution.
"sdk": Specifies the information and version of the SDK. In this above snippet, the version is 1.0.0 and this has two properties - architecture and runtime.
Now here, we will edit some code and include architecture and runtime .

Here, we had added architecture and runtime. Architecture is x6 machine and runtime specifies as clr = ASP.NET 4.6 runtime and coreclr=.NET Core 1.0 runtime.
So, this folder is through Solution Items. Now, let's try to understand the other folder which is the Src folder. In that, we will understand project.json file.

- Dependencies: It includes the dependencies packages that are required to run the application

Here, I have set the dependency as AspNEtCore MVC.
- Frameworks
Defines the framework on which we want to build our app.
- Build Options
Options that are passed to compiler.
- RunTime Options
Manage GC options at runtime.
- Publish Options
The file/ folder which we want to include or exclude while publishing our application.
- Scripts
Specifies the script to be run during building or publishing the app .
The next file which we are going to see is Program.cs file
As you can see from the above snippet, program.cs main method uses WebHostBuilder which is used to create web application host. - UseKestrel()
Defines the Web Server. ASP.NET Core supports IIS hosting and IIS Express, for self hosting scenarios using kestrel and WebListner HTTP servers .
Two different HTTP servers- AspNetCore.Server.Kestrel (Kestrel, cross-platform)
- AspNetCore.Server.WebListener (Web Listener, Windows-only, preview)
- UseContentRoot(Directory.GetCurrentDirectory())
Application based path that specifies to the root directory of your application. - UseIISIntegration()
For hosting IIS and IIS Express . - UseStartup<Startup>()
Specify the startup class, F12, and see the details as
- Build();
The build and run builds the IwebHost which will host the app and start it listening for incoming HTTP requests.
- Run();





















Akshay PhadkePosted Dec 14, 2016, 4:09 AM
Milind Daware Thankyou M glaf u liked the article :)
Milind DawarePosted Dec 14, 2016, 12:32 AM
Very Nice Artical Akshay Sir