ASP.NET core is a significant redesign of ASP.NET. ASP.NET core is an open-source, cross-platform framework for developing cloud-based Applications like Web Applications IoT Applications, and the mobile backend Application. It runs on both frameworks; .NET core and full .NET framework. We can develop and run the ASP.NET core Application on multiple (cross) platforms such as Windows, Mac OS, and Linux.

There are a number of changes to the ASP.net core framework. ASP.NET Core is not based on "System.Web.dll". The "System.Web.dll" works only with the Windows platform to take certain advantages of Windows features. The removal of "System.Web.dll" makes ASP.NET Core distant from ASP.NET Web Forms. It is based on many small and distinct parts. The advantages of smaller apps are reduced servicing, improved performance, and security. Visual Studio 2015 is downloading or importing dependency packages by using NPN, Bower, Grunt, and Gulp.

Following are some improvements in ASP.NET Core.

The new ASP.NET Core framework will have backward compatibility and be able to run on ASP.NET 4.6 libraries. Currently, Microsoft uses "CORE" terminology and discontinues the old numbering system. We can install .NET Framework 4.6 and .NET Core on the same machine. Core has its own core libraries.

.NET Core has core CLR and lightweight .NET runtime, which provides some services, like memory management and garbage collection.

.NET Core is a lightweight and cross-platform version of the .NET framework. It contains a subset of class libraries from the full NET framework and it is designed to work with multiple platforms. The .NET core does not contain any libraries, which depend on Windows platforms like System. Windows, System.Drawing etc.

.NET core is designed with both a core framework and a full framework. It also runs on Roslyn and builds are completely dynamic.

.NET framework

ASP.NET Project Structure

.NET Core adds new concepts to the project structure and it has replaced some legacy elements, found in the previous versions of ASP.NET projects. ASP.NET core runs with the essential components, required to start the Server and serve simple pages. We can add more components to the project, as per the requirement. ASP.NET Core contains a built-in IoC (inversion of control) Container, which is used to configure the dependencies. When we create an ASP.NET Core project using VS 2015, it looks, as shown below.

ASP.NET Project Structure

As shown in the above image, the new structure includes a "Solution Items" folder and this folder contains a file called "global.json" and our Web project is created within the "src" folder within the solution.

The solution contains the following files/folders.

Support for Dynamic Compilation

Roslyn (the new compiler) supports a dynamic compilation. It enables us to change the code of the controller, classes, views, etc. The runtime and the compiler will automatically build the Application. The dynamic compilation enables us to run the Application, using Ctrl + F5 make a change to the file, save it, and refresh, and the application's new changes are immediately in effect. The dynamic compilation feature works with Visual Studio as well as any code editor.

Open source

.NET Core is now open source and many components have already been made available on GitHub. This includes the Roslyn compiler, ASP.NET, and Core CLR.

Conclusion

There are many changes introduced in the ASP.NET Core. With this release, it is possible to work outside Visual Studio. We can also download the dependency, using NPN, Bower, Grunt, and Gulp. The Application developed with older framework versions (4.5.2 or previous) works with full .NET runtime (these will not run on core CLR).