Skip to content
This repository has been archived by the owner on Nov 28, 2020. It is now read-only.

Latest commit

 

History

History
34 lines (26 loc) · 1.17 KB

DE0007.md

File metadata and controls

34 lines (26 loc) · 1.17 KB

DE0007: Platform ID shouldn't be used

Motivation

Certain enum values on System.PlatformID are no longer in use and will never be returned from Environment.OSVersion.Platform.

Recommendation

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.