Understanding .Net Core vs .Net Framework vs .Net Standard

Pritam Ajmire
3 min readJun 16, 2020

--

In this article, we will understand the difference in .Net Core & .Net Framework and how .Net Standard is different from both.

.Net Framework and .Net Core are the two different implementations of .Net Runtime. .Net Core is newer than .Net Framework.

.Net Framework is a framework for building and managing the Windows and Web-based application like Asp.Net or Asp.Net MVC application. This is old framework created by Microsoft and provides end to end solution. This does not support cross-platform deployment.

.Net Core is a cross-platform and open source framework for building the application which can run on any platform like Mac, Linux or Windows. It is also created by Microsoft. It is not a new version on .Net Framework, whereas it is a totally new framework which is written from scratch.

When to use .Net Framework —

  1. Create Windows Forms and WPF applications.
  2. ASP.NET Web Forms.
  3. You need to create a WCF service.
  4. Need to use specific .NET Framework features.
  5. You need to access Windows specific APIs.

When to use .Net Core —

  1. Create cross platforms application.
  2. Can use to create Micro services.
  3. Deploy an application to Dockers container.
  4. Create Asp.Net Core, Razor page, UMP (Universal Windows Platform), Mobile native app and Blazor application.
  5. Create highly performance and scalable application.
  6. Running multiple .NET versions side-by-side.

But, why do we need .Net Standard.

Before understanding .Net Standard, lets understand the architecture of .Net framework & .Net Core then we will see why .Net Standard came into picture. As per shown in the image below, while creating an application of .Net framework or .Net Core or Xamarin they have their own Base Libraries.

So what is the problem —

Consider you have two projects one in .Net Core & another in .Net Framework and in both the project you want to share some common libraries that is in .Net Framework.

How can you do that — You cannot do that due to compatibility issue.

Solution —

Here we need .Net Standard.

.Net Standard is a specification that can be used across all .NET implementations. It is used for developing library projects only. This means if we are creating a library in .NET Standard, we can use those in .NET Framework and .NET Core. As per image shown in image below .Net Standard libraries are shared.

How does .Net Standard works —

Each .Net Standard version contains some set of APIs like System.Data, System.Collections, System.Runtime etc. If a new version of .Net Standard gets introduced then it contains all the previous version set of APIs as well as some of new APIs. So, it means a newer version of .Net Standard contains all the set of APIs from beginning to end which means a higher version of .Net Standard means more APIs availability.

Identifying .Net Standard version to use —

Find below chart to identify the correct .Net Standard version to use for your shared class library project. For more details visit link — https://docs.microsoft.com/en-us/dotnet/standard/net-standard

--

--