If you are new to programming or coding and have just started working on ASP.NET or have started learning C#, you might want to know what .NET framework and about it's architecture. Sometimes you may also want to know about .NET framework because it is required to install some application on your windows.

Introduction to .NET framework

.NET framework is a software developement framework which is used for building and running application on Windows. .NET framework is developed and designed by Microsoft. A framework usually means a collection of Application Programming Interfaces (APIs) and a shared library of code that developers use while developing any type of application.In the .NET Framework, that library of shared code is named the Framework Class Library (FCL).

So, .NET framework is basically a collection of APIs and libraries which developers use to develop many different type of application like desktop-application or web-application. There are various implementation of .NET framework

  • .NET framework: Original .NET implementation, it supports running websites, services, desktop apps etc on Windows platform.
  • .NET Core: .NET Core is an open-source and cross-platform version of .NET that is maintained by Microsoft and the .NET community on GitHub. It support running websites, services, and console apps on Windows, Linux, and macOS

.NET Standard is a formal specification of the APIs that are common across .NET implementations. It allows libraries to build against the agreed on set of common APIs, ensuring they can be used in any .NET application—mobile, desktop, IoT, web, or anywhere you write .NET code.

.NET framework is used to develop desktop applications, Web-based applications, and Web services. There is a many programming languages available on the .Net platform, VB.Net and C# being the most common ones.

What is .NET Framework used for?

.NET Framework is used to create and run software applications. .NET apps can run on many operating systems, using different implementations of .NET. .NET Framework is used for running .NET apps on Windows, while .NET Core is used to build and run applications on Linux,MacOsx or windows.

Who uses .NET Framework?

  • Users, who are using applications built on .NET framework may need to download .NET framework from it's offical website, although you get it already downloaded and installed on Windows 10/7/8.
    Windows 8 and Windows 10 include versions 3.5 and 4 (the current version right now being 4.6.1). They are installed on a first-time-needed basis, so the first time you install an app that needs one of those versions, Windows will add it automatically.
  • Software developers, developers who are builing web-application, windows-application using WPF or form based , or web-service developer may need to install .NET framework.

Architecture of .NET Framework

what-is-net-framework-and-net-framework-architecture-new.png

There are two major components of .NET framework:

  • the common language runtime (CLR), which is the execution engine that handles running apps, and
  • the .NET Framework Class Library, which provides a library of tested, reusable code that developers can call from their own apps. 

What is Common language runtime (CLR) in .NET?

Common Language Runtime is the backbone of the .NET framework. CLR takes care of a number of low-level executions such as application hosting, thread handling, memory management, security checks and application performance. Its primary role is to locate, load, and manage the .NET types (class, array, object etc.)  and provides services like thread management, garbage collection, type-safety, exception handling, and more.

All .NET-supported languages can be executed under this single defined runtime layer.

Just-in-time compiler converts the managed code (compiled intermediate language code), into machine instructions which are then executed on the CPU of the computer.

The CLR first locates the referenced assembly, and then it loads it into memory, compiles the associated IL code into platform specific instructions, performs security related checks, and finally executes the code.

CLR version .NET version
1.0 1.0
1.1 1.1
2.0 2.0,3.0,3.5
4 4,4.5,4.6,4.7,4.8

.NET Framework Class Library (FCL) overview

.NET FCL is the foundation of classes, interfaces, value types, services and providers that are used to construct .NET Framework desktop and Web-based (i.e., ASP.NET) applications. The fundamental elements of the FCL are defined as classes located in the System namespace.

All of the most primitive aspects of .NET are stored in System, including built-in value types, the Object type, and support for exception handling and garbage collection. Thousands of more classes are located in second- and third-level namespaces that include support for network and file I/O, graphics, security, configuration management, and Web services.

The first thing you need to know about the .NET Framework class library is that it is an object-oriented tree derived from a single root: System::Object. The next important characteristic is that the .NET Framework class library strictly follows the rules specified by the common language specification (CLS).

The key rules that you should be aware of are as follows:

  • Global functions and variables are not allowed.
  • There is no imposed case sensitivity (a consequence of the need to support languages like Visual Basic .NET), so all exposed types differ by more than their case. In other words, all public or protected members differ by more then just case.
  • The primitive types allowed as parameters conform to the CLS, namely, Byte,Int16,Int32,Int64,Single,Double,Boolean,Char,Decimal,IntPtr, and String.
  • Variable-length parameter lists to methods are not allowed. Fixed-length arrays are used as parameters instead.
  • Pointers are not allowed.
  • Class types must inherit from a CLS-compliant class.
  • Only single class inheritance is allowed, although multiple inheritance of interfaces is permitted.
  • NET Framework class library is broken up into nearly 100 namespaces.

.NET framework version history

Version Released
.NET Framework 4.8 2019-04-18
.NET Framework 4.7.2 2018-04-30
.NET Framework 4.7.1 2017-10-17
.NET Framework 4.7 2017-04-05
.NET Framework 4.6.2 2016-08-02
.NET Framework 4.6.1 2015-11-30
.NET Framework 4.6 2015-07-20
.NET Framework 4.5.2 2014-05-05
.NET Framework 4.5.1 2013-10-17
.NET Framework 4.5 2012-08-15
.NET Framework 4.0 2010-04-12
.NET Framework 3.5 SP1 2008-11-18
.NET Framework 3.5 2007-11-19
.NET Framework 3.0 2006-11-06
.NET Framework 2.0 2005-11-07
.NET Framework 1.1 2003-04-24
.NET Framework 1.0 2002-02-13

If you are new to .NET and looking to learn ASP.NET or C# you can start by learning C#.

Recommended topics

Introduction to C#

C# and .NET Version History