In this blog, we will see about .Net Framework vs .NET Core vs .Net 5.
Many developers have little doubt about the use of .NET Core and ASP.NET Framework.
If you will visit the Microsoft site to download .NET, you will find 3 options –
- .NET (Latest version 5). Also called .NET 5 (Dot Net 5)
- Dot 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 Framework ?
.NET Framework is a Windows-only version of .NET for building any type of app that runs on Windows. It means the .Net framework is built for Windows machines only. The first version of the .Net framework was .Net Framework 1.0 which was released in Feb 2002 and the last version of .Net Framework is 4.8 (Released in April 2019).
Let’s see the uses of these frameworks which will clear the doubts.
Use .Net Framework for below reasons
- If you are using 3rd party libraries like Nuget packages
- Your application is deployed on a Windows machine.
If your application is based on .NET Framework, the recommendation is to extend instead of migrating your application.
What is .NET Core ?
.NET Core is a free, cross-platform, open-source developer platform for building many different types of applications. The first version .Net Core 1.0 was released in June 2016 and the last version of .Net Core is 3.1 which was released in Dec 2019.
In case you’re assembling another application and have a decision between .NET Core and .NET Framework, .NET Core is the best approach.
Dot NET Core is more qualified for cross-platform needs. .NET Core applications work 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 developers to work with Razor pages which helps developers to be page-focused to code in an easier way compared to Model View Controller.
What is .NET 5?
Dot NET 5 or .NET is a free, cross-platform, open-source developer platform for building many different types of applications. .NET 5 is the next major release after .Net Core 3.1 which was released in June 2016.
The word ‘Core’ is dropped from the name to emphasize that .NET 5 is the future of all earlier versions of DotNET Core.
Recently, in Feb 2021 Microsoft has announced .NET 6 Preview version and .NET 6 stable version is scheduled to be released in November 2021.
Where to use .NET 5?
.NET 5 is the most recent version of .NET till the time of writing this article.
As per Microsoft, .NET 5 is the future of .NET technology.
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
How to build .NET 5 API in Visual Studio Code?
Comparison – .Net Framework vs .NET Core vs .Net 5
There are a 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.
So, based on the above theory, Microsoft offers 2 frameworks for developing server-side applications.
- .NET Framework
- .Net 5 (Including .Net Core)
How to choose the framework for development?
I hope, you are now clear with the fundamentals of the available frameworks.
Now, let’s see a tabular comparison that shows, how to select the framework for building and developing server-side applications.
ASP.NET Core vs ASP.NET
|Platform independent. Works with Windows, macOS, Linux||Works 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 applications in |
Visual Studio, Visual Studio for Mac, Visual Studio Code.
|Here, we have Visual Studio only.|
|Uses .NET Core runtime||It uses .NET framework runtime.|
How to build .NET 5 API in Visual Studio 2019?
ASP.Net Core 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 the left panel i.e. in the 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 an 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 the 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 projects?
If you select .NET Core Web Application then you will have the 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 the 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.
Are you preparing for Microsoft Azure AZ 900 Certification Exam? Follow this link - Microsoft Azure Fundamentals (AZ-900) Certification Sample Questions
- .NET 5 includes .NET Core.
- .NET 5 is the next major release of .NET Core after .Net Core 3.1.
- 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 5 is the future of .NET technology.
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
You may love to read this article - Migrate .NET Core 2.2 Project to .NET Core 3.1
Keep following https://www.sharepointcafe.net/
2 thoughts on “.Net Framework vs .NET Core vs .Net 5 – Know Differences”
It is really helpful information about Microsoft .NET versions and cleared all my doubts. Thanks.
Nice Explanation, Thanks!