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.
Recommended action
Update your code to expect the new version, or use typeof(object).Assembly.ImageRuntimeVersion
instead.
Affected APIs
See also
The following changes are related:
Обратна връзка
https://aka.ms/ContentUserFeedback.
Очаквайте скоро: През цялата 2024 г. постепенно ще отстраняваме проблемите в GitHub като механизъм за обратна връзка за съдържание и ще го заменим с нова система за обратна връзка. За повече информация вижте:Подаване и преглед на обратна връзка за