The OSVersion
property doesn't provide a reliable way to identify the exact OS and its version.
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.