.NET Core vs .NET Standard: Quick & Simple Comparison

First, as Microsoft simply described, .NET Core is an open-source, general-purpose development platform maintained by Microsoft and the .NET community on GitHub. .NET is cross-platform which supports Windows, macOS, and Linux and can be used to implement devices, cloud, and IoT applications.

Historically, the .NET Framework had only worked on Windows devices. The Xamarin and Mono projects worked to bring .NET to mobile devices, macOS, and Linux. .NET Core provides a standard base library that can now be used across Windows, Linux, macOS, and mobile devices, still via Xamarin.

.NET Core has multiple characteristics such as cross-platform programming for Windows, Linux, and MacOS, as well as consistency across architectures. It runs your code with the same behavior on multiple architectures, including x64, x86, and ARM. .NET Core provides flexible deployment, can be included in your app or installed side-by-side such as user-wide or system-wide installations, and can be used with Docker containers.

A Quick And Simple Look To .NET Core And Comparison To .NET Standard

.NET Core makes it simpler for developers to build microservice architecture systems promptly. As such, systems include several independent and dynamic microservices, the developers can focus on specific microservices. .NET Core enables programmers to develop custom microservices by using varying programming languages, technologies, and frameworks. Likewise, the developers can build a robust system by combining multiple microservices flawlessly.

Programming Language Support

From a programming point of view, C#, Visual Basic, and F# languages can be used to write applications and libraries for .NET Core. Additionally, with .NET Core 3.0, C# 8.0 will be supported. Currently, VB.NET compiles and runs on .NET Core, but the separate Visual Basic Runtime is not implemented. Microsoft announced that .NET Core 3 would include the Visual Basic Runtime.

General Supported Features

  • .NET Core supports four cross-platform scenarios: ASP.NET Core web apps, command-line apps, libraries, and Universal Windows Platform apps. However, it does not presently apply Windows Forms or WPF, which render the standard GUI for desktop software on Windows. Also, .NET Core 3 supports desktop technologies WinForms, WPF, and UWP. Besides these, .NET Core supports the use of NuGet packages. Differently than before like .NET Framework, which is serviced using Windows Update, .NET Core depends on its package manager to get updates.
  • .NET Core consists of CoreCLR, a whole runtime implementation of the Common Language Runtime, which was created at Microsoft as the virtual machine for handling execution of .NET programs and includes a just-in-time compiler called RyuJIT. Moreover, .NET Core also contains CoreRT, the .NET Native runtime enhanced to be integrated into AOT compiled native binaries.
  • .NET Core also includes CoreFX, which is a partial branch of .NET Framework standard libraries. While .NET Core shares a subset of .NET Framework APIs and comes with its own API that is not a subset of .NET Framework. Also, a variant of the .NET Core library is used for UWP.
  • .NET Core's command-line interface provides an execution entry point for operating systems and gives developer services similar to compilation and package management.

Use .NET Core when

  • You want to build cross-platform applications
  • If the new application (web or service) needs to run on multiple platforms- Windows, Linux, macOS, choose .NET Core over .NET Framework. Visual Studio Code and third-party editors such as Sublime, Emacs, and VI support .NET Core for cross-platform development.
  • The need is to build high-performance and scalable systems
  • When a performance-oriented and scalable system is on the list, it is better to prefer .NET Core over the .NET Framework. The reason is, that .NET Core offers high-performance server runtime for Linux and Windows servers.
  • When you are using microservices or Docker containers
  • For applications or services that use microservices or Docker containers, opting for .NET Core makes more sense. Reasons include,
    • .NET Core facilitates mixing microservices or services developed with Ruby, Java, .NET Framework, or other monolithic technologies.
    • Containers usually work in conjunction with microservices architecture. With the .NET Framework, there is a limitation to work with Windows containers only. Moreover, while creating and deploying a container, the image size is smaller with .NET Core vs .NET Framework.
  • You need side-by-side .NET versions per application
  • For applications that may have a dependency on different versions of .NET for installation, opt for .NET Core. .NET Core offers side-by-side installation of multiple versions for .NET Core runtime on the same machine.

Use the .NET Framework when

  • The app is using .NET technologies that are not available for .NET Core.
  • Several .NET technologies are not available for .NET Core. For example, ASP.NET web page applications or workflow-related services (WCF Data Services, Windows Workflow Foundation) are not included. NET Core.
  • The existing app uses a platform that .NET Core does not support.
  • Some of the Microsoft or third-party services/platforms do not offer support to .NET Core. For example, Azure’s Service Fabric Stateful Reliable Services programming model does not support .NET Core and is available for .NET Framework.

Finally, the .NET Framework supports Windows and web applications. .NET Core is the new open-source and cross-platform framework to build applications for all operating systems including Windows, Mac, and Linux. .NET Core supports UWP and ASP.NET Core only.