Muokkaa

Jaa


GetSystemVersion no longer returns ImageRuntimeVersion

RuntimeEnvironment.GetSystemVersion() no longer returns Assembly.ImageRuntimeVersion, which is a .NET Framework-oriented value. It's been updated to return a more relevant value, however, the historical leading v has been maintained.

Previous behavior

RuntimeEnvironment.GetSystemVersion() returned Assembly.ImageRuntimeVersion, which is an indicator of .NET Framework in-place replacement, not a product release.

Example: v4.0.30319

New behavior

Starting in .NET 8, RuntimeEnvironment.GetSystemVersion() returns "v" concatenated with Environment.Version, which is the version of the CLR.

Example: v8.0.0

Version introduced

.NET 8 RC 1

Type of breaking change

This change is a behavioral change.

Reason for change

The existing version wasn't useful or meaningful for .NET.

Update your code to expect the new version, or use typeof(object).Assembly.ImageRuntimeVersion instead.

Affected APIs

See also

The following changes are related: