In this article, we will learn about the differences between .NET Framework & .NET Core (.NET 5+) i.e. NET Framework vs .NET Core.
This is the third post in the series – Getting Started with .NET Platform, .NET Framework & .NET Core (.NET 5+)
- Post 1 – Introduction to .NET Framework
- Post 2 – Introduction to .NET Core (.NET 5+)
- Post 3 – .NET Framework vs .NET Core (.NET 5+) (this post)
- Post 4 – Migrate from .NET Framework to .NET Core (.NET 6) – Detailed Guide
So far as part of this series we have learned about .NET Platform (.NET Ecosystem), .NET Framework & .NET Core (.NET 5+). Now lets looks at differences between .NET Framework & .NET Core.
The .NET development platform supports the development of many types of applications with multiple programming languages and also provides libraries for the development of these applications along with runtime for the execution of these applications on user machines.
It is critical to understand the difference between .NET Framework & .NET Core before you make a choice for the Framework to create a new project using Visual Studio.
.NET Ecosystem
.NET Platform provides majorly 3 different implementation to choose from i.e. .NET Framework, .NET Core (.NET 5+) and Xamarin.
Xamarin is the only choice when it comes to developing mobile applications for iOS or Android so there is no confusion with the platform for the development of mobile applications.
What is .NET Framework?
.NET Framework is a platform provided by Microsoft for software developers and this developer platform consists of runtime services, base class libraries that can be used in your code, various tools to support software development tasks and also this platform supports more than one programming language to choose from.
What is .NET Core?
.NET Core now known as .NET is a free, open-source, cross-platform development platform created and maintained by Microsoft for building various types of applications for the users. .NET Core platform is also being maintained by the .NET community on GitHub along with Microsoft.
.NET Framework & .NET Core has been covered in detail in the previous posts of this series so please read those articles for further details on .NET Framework & .NET Core
.NET Framework vs .NET Core (.NET 5+)
Below is the comparison between the .NET Framework vs .Net Core based on various parameters that are important for the development, deployment & maintenance of any type of application.
Framework Versions
Below are the version number of the Frameworks that are included in the different implementations of the .NET i.e. .NET Framework & .NET Core
.NET Implementation | .NET Framework Versions Included |
.NET Framework | .NET Framework 1.0 – 4.8 |
.NET Core | .NET Core 1.0 – 3.1, .NET 5+ (includes .NET 5 and later versions) |
Platforms
.NET Core supports multiple platforms like Windows, macOS & Linux whereas .NET Framework-based applications support only the Windows platforms.
.NET Implementation | Platforms Supported |
.NET Framework | Windows |
.NET Core | Windows, macOS and Linux |
Programming Languages
Both .NET Framework & .NET Core supports C#, Visual Basic & F# programming languages for development but .NET core does not support Visual Basic & F# for all project types
.NET Implementation | Programming Languages Supported |
.NET Framework | Visual Basic, C# & F# |
.NET Core | C# is supported for all project types. Visual Basic & F# is also supported but not for all project types |
Integrated Development Envrionment
Visual Studio can be used for .NET Framework & .NET Core based application types as it provides an Integrated Development Environment (IDE) for Windows and macOS. You can also use Visual Studio Code for .NET Core based applications, which runs on macOS, Linux, and Windows.
.NET Implementation | IDE Supported |
.NET Framework | Visual Studio |
.NET Core | Visual Studio & Visual Studio Code also supports .NET, including IntelliSense and debugging. |
Open Source
.NET Core was developed with a goal to keep it open source as the new trend in the industry was open source software and .NET Framework was not open source
.NET Implementation | IDE Supported |
.NET Framework | Certain components of .NET Framework are open source |
.NET Core | .NET Core is open source |
So when to choose .NET Framework vs .NET Core
So far we saw what is .NET Framework & .NET Core and we also understood the differences between .NET Framework vs .NET Core. Now let’s understand in detail when to choose .NET Framework vs .NET Core and vice-versa.
Scenarios to choose .NET Framework
Your application is already on .NET Framework then it is not recommended to be migrated to .NET Core as .NET Framework has not been deprecated and Microsoft will continue to support it. You can always extend an existing application by writing the new service in .NET Core instead of .NET Framework.
Your application is using a third-party library or NuGet package that is not available for the .NET Core implementation of the .NET ecosystem.
Your .NET Framework-based application requires a platform that is not supported by the .NET Core implementation of the .NET ecosystem.
Your .NET Framework-based application is using a technology that is not supported on the .NET Core implementation of the .NET ecosystem. Here is the list of technologies that are available on .NET Framework but not supported on .NET Core
- ASP.NET Web Forms applications
- ASP.NET Web Pages applications
- WCF Service implementation
- Windows Workflow Foundation (WF), Workflow Services and WCF Data Services
- Support for Visual Basic & F# as these are not supported in the .NET Core implementation of the .NET ecosystem for all the project types.
Scenarios to choose .NET Core
You are developing a new application from scratch then it is always better to use .NET Core as it is written from scratch to support lightweight, cross-platform and modular characteristics.
You want to develop a cross-platform compliant application. .NET Core support multiple platforms like Windows, macOS & Linux whereas .NET Framework supports only Windows.
You want to deploy your application as a containerized application using containers such as docker. The .NET framework based applications can also be deployed in containers but the lightweight, modular & cross-platform nature of .NET Core makes it a better choice for containers as it makes containers light and fast to start.
You want to develop microservices as microservice is meant to be as small as possible and .NET Core characteristics like lightweight, modular, cross-platform and ideal for containers make it an ideal choice for microservices as compared to .NET Framework. Also all the latest platform microservices like Azure Service Fabric and Azure App Service support .NET Core and make them ideal for hosting your .NET Core microservices.
You want to develop an application that needs the best possible performance and scalability then, in that case, .NET Core based applications are the best option as compared to .NET Framework. Since .NET Core has been developed from scratch and has been designed to provide high scalability and performance in comparison to .NET Framework because of the characteristics supported by .NET Core.
You need to install multiple applications with different versions of .NET on the same machine then in those scenarios, .NET Core is the best choice compared to .NET Framework. The .NET Core supports the installation of different versions of the runtime on the same machine. This side-by-side installation of .NET Core allows deployment of multiple applications with different versions of .NET Core on the same machine.
Summary
We learned about the .NET ecosystem and mainly looked at the differences between the .NET Framework vs .NET Core implementation of the .NET ecosystem. We also saw which implementation we should choose i.e. .NET Framework vs .NET Core based on the requirements we have for the development of the application.
Hope you enjoyed reading this article. Please provide your suggestions & questions in the comments section below
References – .NET Framework vs .NET Core
You can also check my other trending articles on .NET Core to learn more about .NET Core Applications
- Microsoft Feature Management – Feature Flags in ASP.NET Core C# – Detailed Guide
- Microservices with ASP.NET Core 3.1 – Ultimate Detailed Guide
- Entity Framework Core in ASP.NET Core 3.1 – Getting Started
- Series: ASP.NET Core Security – Ultimate Guide
- ML.NET – Machine Learning with .NET Core – Beginner’s Guide
- Real-time Web Applications with SignalR in ASP.NET Core 3.1
- Repository Pattern in ASP.NET Core with Adapter Pattern
- Creating an Async Web API with ASP.NET Core – Detailed Guide
- Build Resilient Microservices (Web API) using Polly in ASP.NET Core