Certain enum values on System.PlatformID
are no longer in use and will never
be returned from Environment.OSVersion.Platform
.
Change your code to stop testing for these enum members and make sure you use the correct ones.
ID | Comment |
---|---|
Win32S | Unused |
Win32Windows | Unused |
WinCE | Unused |
Xbox | Unused |
MacOSX | Replaced. This value was only returned by Silverlight. On .NET Core, it returns Unix . |
Code that compares Environment.OSVersion.Platform
to PlatformID.MacOSX
should use the newer RuntimeInformation.IsOSPlatform(OSPlatform.OSX)
method instead.