.NET Core Runtime vs .NET Framework Runtime

Ankush Jain
3 min readJan 14, 2022

--

During my transition period from .NET Framework to .NET Core, one thing really confused me over long period of the time, and that was “runtime”. Runtime has different meaning in .NET Framework and .NET Core.

Runtime for .NET Framework — The History

When someone asks us, what’s .NET Framework runtime, we instantly say CLR (Common Language Runtime), and that is absolutely correct.

This automatically created an impression on our mind that the runtime for .NET Core will be CoreCLR. However that’s true as well, as CoreCLR is the actual runtime that runs the compiled code for .NET Core applications.

But now let’s understand what extra is there in .NET Core runtime apart from CoreCLR.

What’s new in .NET Core Runtime?

Confusion starts when many websites mentions, you have to download ASP.NET Core runtime to run ASP.NET Core application, or install newer runtime to run .NET 6 applications as .NET 6 application will not run on older .NET 5 or .NET Core 3.1 runtimes.

Why so many runtimes?

These things create confusion (if you compare things with .NET Framework) as we never updated runtime in .NET Framework even when were upgrading from 4.5 to 4.6, or 4.6 to 4.7 or 4.8.

So, why does .NET Core ask us to update runtime?

Well, the catch here is the term runtime and it’s different meaning in different context.

  • Runtime in .NET Framework was just CLR
  • Runtime in .NET Core is not just CoreCLR, but it also includes the .NET Core Base Class Libraries as well.

Starting with .NET Core, Microsoft started communicating that a .NET Core runtime is not just the CLR, but it includes everything that are essential to run a .NET Core application.

So, as per this, a typical .NET Core runtime will include the following:

  • CoreCLR — Actual runtime
  • .NET Core Base Class Library (CoreFx or .NET Core Framework Libraries)

Once a .NET Core runtime is installed, you can easily run a .NET Core Console application.

Installing only .NET Core runtime doesn’t enable you run an ASP.NET Core web application.

To run an ASP.NET Core web application, you would also need an ASP.NET Core runtime along with existing .NET Core runtime.

ASP.NET Core runtime is a set of framework libraries that builds this ASP.NET Core application framework.

To summarize, following are required to run an ASP.NET Core web app:

  • .NET Core runtime (CoreCLR + BCL)
  • ASP.NET Core runtime (ASP.NET Core framework libraries)

You can see all the installed runtime from this location: C:\Program Files\dotnet\shared

Installed .NET Core runtimes

Hope things are much clear now!

Origin of confusion

All this confusion happened because earlier for .NET Framework, we did not consider BCL (Base Class Libraries) a part of runtime, and just considered CLR as runtime. Ideally, CLR & BCL collectively should have been called as .NET Framework Runtime.

Wrap-up

Thanks for reading! If you liked this, give it some love by pressing on the 👏 button! Feel free to comment and highlight.

Have fun and happy coding!

--

--

Ankush Jain

Software Engineer | Mostly writes about .NET, JavaScript, AWS Cloud & Serverless.