Which versions of the CLR are available in the platforms.Net Core and.Net 5?

I can't find my bearings in modern versions of the CLR

.Net Framework 2-3.5 is CLR 2

.Net Framework 4 - 4.8 is CLR 4

In which version of the CLR the code is executed .Net Core 1, 2, 3, and .Net5 ?

Author: 4per, 2021-01-18

2 answers

In .The NET Core version of the CLR is the same as the version of itself .NET Core. CLR updates are released along with standard library updates. If we talk about the Environment.Version property, before version 3.0, it returned a false value 4.0.30319.42000 for backward compatibility purposes. Starting from 3.0, it returns the actual version .NET Core, for example 3.1. x for .NET Core 3.1. Technically, the version of the Microsoft.NETCore NuGet package is taken.App from the .deps.json file.

Build version in metadata (directive .assembly in IL) for some standard libraries remains 4.0, apparently also for backward compatibility, since this version is used to resolve dependencies using a strictly named one. The file version for some DLLs, which is displayed in the file properties in explorer, also mostly remained 4.x, but this value does not affect anything at all.

 1
Author: MSDN.WhiteKnight, 2021-01-18 07:48:21

.Net Core 1, 2, 3, and. Net5 all use CoreCLR.

.NET Core and .NET 5+ releases have a single product version, that is, there is no separate CLR version. CLR versions

Also: Introducing .NET 5

 2
Author: Qareke, 2021-01-18 08:00:07