You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like System.Environment.OSVersion is unmaintained (should be Obsolete though).
Alternative is Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.OperatingSystemVersion in the Microsoft.DotNet.PlatformAbstractions nuget package.
On Win10, OSVersion for 2.1 returned 10.0.x, however with 3.0, it returns 6.2.x. Although the documentation says it is unreliable, this is a regression and breaking some PSCore6 tests that were relying on this and likely customer scripts as well.
@SteveL-MSFT please file a new bug, let's not hijack long-closed issues.
BTW: This is long-term source of pain. It may have been by-design breaking change in an attempt to fix the space ... let's see what area experts say on the new issue.
Hi,
how do I get correct Windows runtime version that is listed in "winver" command?
when I execute command "winver" it returns "Version 1709 (OS Build 16299.371)"
.NET Core 2.0 app:
System.Environment.OSVersion returns "Microsoft Windows NT 6.2.9200.0"
System.Runtime.InteropServices.RuntimeInformation.OSDescription returns "Microsoft Windows 10.0.16299 "
Do I have to manually extract it form the OSDescription?
Thanks
The text was updated successfully, but these errors were encountered: