Problem

When reviewing the operating system displayed by Loupe for an application you may notice that it says Windows 8.0 even though you know the computer in question is running Windows 8.1 or Windows 10.  It may even show Windows 8.0 for some applications and not others on the same computer.


Cause

Microsoft changed the API used to determine the current OS version to return incorrect results to callers as of Windows 8.1.  Instead of reporting the true version of the operating system, it will only report up to the highest version that the application has declared it was compatible with in its App.Manifest file.  This means applications without an app.manifest or ones that do not explicitly include Windows 8.1 or Windows 10 will report as Windows 8.  Microsoft has worked to close every approach to reliably determining the real OS version, making it infeasible at this time for the Loupe Agent to get the correct true version number.


Solution

Change your application to include an app.manifest and include the Windows 8.1 and Windows 10 application GUID's in its list.  The application manifest will look substantially like this (Taken from Loupe Desktop itself):


 

<?xml version="1.0" encoding="utf-8"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
  <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
  <asmv3:application>
    <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
      <dpiAware>false/PM</dpiAware>
    </asmv3:windowsSettings>
  </asmv3:application>
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <!-- A list of all Windows versions that this application is designed to work with. Windows will automatically select the most compatible environment.-->
      <!-- If your application is designed to work with Windows Vista, uncomment the following supportedOS node-->
      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>

      <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>

      <!-- If your application is designed to work with Windows 8, uncomment the following supportedOS node-->
      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>

      <!-- If your application is designed to work with Windows 8.1, uncomment the following supportedOS node-->
      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>

      <!-- Windows 10 -->
      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
    </application>
  </compatibility>
</assembly>

 

Note that you do not need to change the assemblyIdentity information for a .NET application - it can (and likely should) be left with its default setting.