Since .NET 4 and Windows 8 or greater platforms it's quite uncertain to get the OS version where your program is ran.
For instance, running in a Windows 10, if my project has a Windows 8 DLL then the Environment.OSVersion.Version
returns 6.2.9200.0
which is Windows 8 and not Windows 10.
This behaviour is explained in this question (crono's answer): Windows version in c#
So my question is the following: How can we detect for sure (and staying in a .NET way in order to be able to use it on non-Windows platforms) the OS version where our application is running?
Link to MSDN:
https://msdn.microsoft.com/en-us/library/system.environment.osversion(v=vs.110).aspx