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

Latest commit

 

History

History
15 lines (10 loc) · 592 Bytes

DE0009.md

File metadata and controls

15 lines (10 loc) · 592 Bytes

DE0009: Environment.OSVersion shouldn't be used

Motivation

The OSVersion property doesn't provide a reliable way to identify the exact OS and its version.

Recommendation

Use the RuntimeInformation.IsOSPlatform method to identify the OS platform. Avoid writing code dependent on reported OS version and instead check for availability of the needed features.