.Net Framework vs .NET Core vs .Net 5 – Choose your framework

Many developers have little doubt about the use of .NET Core and .NET Framework.

If you will visit Microsoft site to download .NET, you will find 3 options –

  • .NET (Latest version 5)
  • .NET Core (Latest version 3.1)
  • .NET Framework (Latest version 4.8)

It creates a doubt in our mind, Which one should we download ? Which would be better for our project? and many more.

So let’s get rid of these doubts in this blog, and know where all these three can be used, and what are the benefits?

What is .NET ?

.NET is a free, cross-platform, open-source developer platform for building many different types of applications. The latest stable version of .NET is .NET 5. .NET 5 was released in June 2016.

Recently, in Feb 2021 Microsoft has announced .NET 6 Preview version and .NET 6 stable version is scheduled to be released in November 2021.

What is .NET Core ?

.NET Core is a free, cross-platform, open-source developer platform for building many different types of applications. The latest version of .Net Core is 3.1.

In case you’re assembling another application and have a decision between .NET Core and .NET Framework, .NET Core is the best approach.

.NET Core is more qualified for cross-platform needs. .NET Core applications works on Windows, Linux, and macOS. You may choose .NET Core, if you are planning to follow Microservice architecture.

You can use Blazor to create interactive client-side UI with .NET. .NET Core allows developer to work with Razor pages which helps developers to page-focused to code in a easier way compare to Model View Controller.

What is .Net Framework ?

.NET Framework is a Windows-only version of .NET for building any type of app that runs on Windows. The latest version of .Net Framework is 4.8.

Let’s see the uses of these framework which will clear the doubts.

Where to use .NET ?

.NET 5 is the most recent version of .NET.

Use .NET 5 for below reasons

  • You need cross-platform application
  • If you are planning for Microservice architecture
  • You are using Docker containers.
  • To develop a high-performance and scalable application

Use .Net Framework for below reasons

  • If you are using 3rd party libraries like Nuget packages
  • You application is deployed on a server, which doesn’t support .NET 5

Microsoft recommend to extend instead of migrating your application.

Key Changes in .Net 5 and .Net Core compare to .Net Framework

There are lot of changes in .NET 5 and .Net Core compare to .Net Framework.

Traditional ASP.Net web forms is no more available in .Net 5/ .Net Core. So, if your application is based on ASP.Net web forms you can not use .Net Core.

Windows Workflow Foundation, ADO.Net Data Services are only available with .Net Framework.

So, based on above theory, Microsoft offers 2 framework for developing server side application.

  1. .NET Framework
  2. .Net 5 (Including .Net Core)

How to choose the framework for development?

Hope, you are now clear with fundamentals of the available frameworks.

Now, let’s see a tabular comparison which shows, how to select the framework for building and developing server side application.

ASP.NET Core vs ASP.NET

ASP.Net CoreASP.Net
Platform independent. Works with Windows, MacOS, LinuxWorks only on Windows environment.
You may use Razor pages to create Web UI.Uses traditional Web forms to create web pages.
You can develop ASP.Net Core based application in
Visual Studio, Visual Studio for Mac, Visual Studio Code.
Here, we have Visual Studio only.
Uses .NET Core runtimeIt uses .NET framework runtime.

Work with Visual Studio 2017

Let’s open Visual Studio to explore more about available project templates, I have Visual Studio 2017.

You may notice that, in left panel i.e. in Installed project, we have –

Web, .Net Core and .Net Standard.

Q. Which one to choose for your project?

Choose .NET Core, if you want to create a .NET Core based command line application to run on Windows, Linux and MacOS.

Select .Net Standard for creating a class library project which targets .NET standard.

If you want to develop application in previous versions of .NET framework or to develop a traditional ASP.Net Web Form application then select Web->Previous Versions

For developing modern Web applications, we have 2 options.

Click on Web from left side and you will see –

ASP.Net Core Web Application and ASP.NET Web Application (.NET Standard)

.NET Core Web Application vs ASP.Net Web Application in Visual Studio

If you are trying to create a new web project in Visual Studio, doesn’t matter which version. It could be Visual Studio 2017 or 2019, you will see 2 options. .NET Core Web Application and ASP.NET Web Application.

What are the differences between these 2 project?

If you select .NET Core Web Application then you will have following project options to create with .NET Core or .NET Framework –

  • API Project – A project template for creating RESTful HTTP service in ASP.NET Core.
  • Web Application – Create Web Application in .Net Core with Razor pages.
  • Web Application (Model-View-Controller) – It is used to create ASP.Net Core MVC Projects.
  • Razor Class Library – A project template for creating Razor Class Library.
  • Angular – Create ASP.NET Core application with Angular.
  • React.js – Create ASP.NET Core application with React.js.
  • React.Js and Redux – Project template to create ASP.NET Core with React.Js and Redux

If you select ASP.NET Web Application then you will have following project options –

  • Web Forms – Project template for creating website with traditional Web forms.
  • MVC – Template to create ASP.Net MVC Project.
  • Web API – To create a RESTful HTTP services.
  • Single Page Application – A project template to create rich client side Java Script driven HTML 5 application with ASP.Net Web API.
  • Azure API App – Create a project template which provides a platform for hosting REST APIs, also you can publish your APIs in market place which will be available publicly.

Summary –

  • .NET 5 includes .NET Core
  • To run your application on multiple platform like Windows, MAC and Linux, you should pick .NET Core
  • .NET Framework is a Microsoft product, which is maintained on Servers available in Microsoft.
  • There is no .NET Core 4 version. After .NET Core 3.1, Microsoft has introduced .NET 5
  • .NET 5 doesn’t support traditional Web Forms, and Windows Workflow Foundation (WWF).
  • .NET Core is the future of .NET

Hopefully, all your doubts related to .NET Core and .Net Framework will be cleared.
If there is any feedback, please write your comment in the box below.

You may check .NET Core Interview Questions and Answers

Keep following https://www.sharepointcafe.net/

Please follow and like us:

Leave a Comment