Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

185
Views
Windows 10 RTM OSVersion not returning what I expect

When call Windows 10 version with:

Environment.OSVersion.ToString()

Return this

enter image description here

Windows 8 and 8.1 version return 6.2 not 6.3 ?!

Im using Windows 10 RTM (upgrade from Insider with windows update) VS 2015 RC and .Net 4.6

Now i need to get the correct version of windows, any solution?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

It's not a bug, it's in MSDN:

Operating System Version

Windows 10 Insider Preview    10.0*
Windows Server Technical Preview    10.0*
Windows 8.1 6.3*

*: For applications that have been manifested for Windows 8.1 or Windows 10 Insider Preview. Applications not manifested for Windows 8.1 or Windows 10 Insider Preview will return the Windows 8 OS version value (6.2). To manifest your applications for Windows 8.1 or Windows 10 Insider Preview, refer to Targeting your application for Windows.

What do you need the Windows version for anyway?

over 4 years ago · Santiago Trujillo Report

0

Use WMI query instead, it is the most reliable way to get the version and related product name.

        public static KeyValuePair<string, string> GetOSVersionAndCaption()
        {
              KeyValuePair<string, string> kvpOSSpecs = new KeyValuePair<string, string>();
              ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT Caption, Version FROM Win32_OperatingSystem");
        try
        {

            foreach (var os in searcher.Get())
            {
                var version = os["Version"].ToString();
                var productName = os["Caption"].ToString();
                kvpOSSpecs = new KeyValuePair<string, string>(productName, version);
            }
        }
        catch { }

        return kvpOSSpecs;
    }
over 4 years ago · Santiago Trujillo Report

0

Windows 10 has a new registry key - you will get a result of 10 from Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CurrentMajorVersionNumber", Nothing) and (in theory) not from earlier versions.

This runs in 0 milliseconds according to the stopwatch object, whereas the WMI method takes at least 30 ms for me.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!