Starting with the .NET 4 and Windows 8 or higher platforms, it’s quite difficult to get the version of the OS where your program is running.
For example, working in Windows 10, if my project has a Windows 8 DLL, it Environment.OSVersion.Versionreturns 6.2.9200.0which is Windows 8, not Windows 10.
This question explains this ( crono ): Windows version in C #
So, my question is this: how can we accurately determine (and stay in the .NET way to use it on platforms other than Windows), in the OS version where our application works?
MSDN Link:
https://msdn.microsoft.com/en-us/library/system.environment.osversion(v=vs.110).aspx
source
share