.NET Core versus .NET Framework

CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

.Net Tutorials

Today, we will be discussing the differences between .NET and .NET Core so you can easily choose the right .NET runtime for your next project. In the upcoming sections of this programming tutorial, we will see how we can make the best of each of them.

Read: The Top Online Courses to Learn .NET

What is the .NET Framework?

In the beginning, the .NET Framework was used only on Windows operating systems. However, with the advent of Mono projects and Xamarin, it can now run on macOS, mobile devices, and Linux operating systems as well.

The .NET architecture is made up of the following components:

  • CLS: The Common Language Specification (CLS) defines the way objects are implemented so they can work everywhere .NET works.
  • CLR: The Common Language Runtime (CLR) is a virtual machine used to run and manage .NET programs.
  • Framework Class Library: A .NET standard library consisting of interfaces, reusable classes, and value types.
  • Visual Studio: Visual Studio is an integrated development environment (IDE) used to create web apps, cloud apps, standalone applications, websites, and web services.

Both .NET and .NET Core runtimes are used for building applications using .NET standards. The .NET Standard comprises a common set of APIs with which code can be shared across different platforms, such as cloud apps and services, desktop applications, web apps, and so forth.

The .NET Framework is primarily used for creating web applications, server-side applications, and desktop applications. On the other hand, .NET Core is used to create server-based applications and web applications that can be developed and deployed cross-platform. .NET Core does not currently support developing desktop applications using a user-interface.

What is .NET Core?

.NET Core is an open-source and cross-platform technology that is the best suitable option for the development of an application that can be run on any platform. .NET Core is also used for developing large enterprise applications and for developing cloud-based applications.

When Should Developers Use .NET Core?

We recommend using .NET Core when the following apply:

  • CLI (Command Line Interface) Tools Are Needed: Some programmers prefer to work with a lightweight and moderate command-based tool. .NET Core has a CLI-based tool that requires minimum installation on the machine, although developers can switch to an IDE, such as Visual Studio or Visual Studio Code, later if they do not want to work with command-based tools.
  • Running multiple .NET versions in Parallel: .NET developers can take the leverage of running multiple services (with different .NET versions) on the same server through .NET Core.
  • Cross-platform Needs: .NET Core code can run efficiently on different platforms, such as macOS, Windows, and Linux. Moreover, Microsoft’s most popular IDE Visual Studio supports all major OS’ today and the list is still growing. Apart from Windows, Visual Studio can be run on macOS with a limited version and on Linux too.
  • Microservices: Microservices are small pieces of software consisting of modular business components. These components contain unique features that can be deployed independently. .NET Core is lightweight and compatible with the creation of these micro-services.
  • Docker Containerization: Container architecture is also lightweight and modular, in the same way as Microservices architecture. .NET Core allows cross-platform server apps to deploy on containers with ease.

Read: The Top Task Management Tools for Developers

When Developers Should Not Use .NET Core

We do not recommend using .NET Core if the following apply.

You encounter a situation where .NET Core might not be a great option. This might be possible due to a lack of support for certain libraries or extensions. Consider the following scenarios:

  • No Support for WPF Applications: If you wish to develop desktop applications on macOS, then you need some other compatible software framework, such as Mono, to work on macOS.
  • .NET Features Are Missing: A few features of .NET are not present in .NET Core. For instance, Entity Framework Core no longer has the same package of features that Entity Framework v6 had.
  • No Current Support for WCF: .NET Core does not support WCF. Instead, you have to use RESTful APIs to carry out the functionality you want to achieve using WCF.

When Developers Should Use .NET Framework

.NET is shipped with Windows. It can be used for building large-scale business applications using different data connection tools. Some of the services provided by the .NET framework include:

  • Memory Management
  • Developing APIs
  • Data Structures
  • Application deployment

Developing applications in .NET is feasible when:

  • You Want to Use a Service Not Available in .NET Core: There are some technologies in .NET which .NET Core does not support, including: ASP.NET Web Forms, ASP.NET SignalR, Windows Communication Foundation, WCF Data Services, and Windows Presentation Foundation.
  • Using Packages and Libraries Not Available in .NET Core: Despite the great popularity of .NET Core, some third-party libraries are not compatible with it, so in this situation developers need to switch to the .NET Framework.
  • Platforms Not Supporting .NET Core: There are some Microsoft and other third-party platforms which still do not support .NET Core. For instance, some of the Azure services are not still compatible with .NET Core.

When Developers Should Not Use .NET Framework

There are some scenarios where using the .NET Framework is not suitable. These include:

  • When an open source project workflow is required.
  • You want to create a cross-platform application.
  • Where high performance and scalability are required.

Platforms Supporting .NET Standards

As we already know, the .NET Standard comprises a common set of APIs that ensures code sharing across mobile applications, desktop applications, and cloud services is possible.

Apart from .NET Framework, and .NET Core, there are so many other platforms that are supported by .NET Standards. They are listed below:

  • Mono: Mono is an open source platform based on the Common Language Infrastructure (CLI). Collaborated by Microsoft, it supports ECMA standards. This platform does not limit .NET developers to only using C#, but they can also use Python, Ruby, Java, and Visual Basic.
  • Windows Phone: Windows Phone was primarily developed for mobile consumers and was based on the .NET Framework. It was replaced by Windows 10 Mobile in 2015.
  • Windows Phone Silverlight: This deprecated mobile application platform was created to run internet applications smoothly on Windows Mobile devices. It is no longer supported.

Read more .NET programming tutorials and software development tips.

Tariq Siddiqui
Tariq Siddiqui
A graduate in MS Computer Applications and a Web Developer from India with diverse skills across multiple Web development technologies. Enjoys writing about any tech topic, including programming, algorithms and cloud computing. Traveling and playing video games are the hobbies that interest me most.

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read