Feature Usage - Windows 10 detection
AndreL
Posts: 2
Hi,
SmartAssembly reports Windows 10 as Windows 8 under feature usage on my system. Why is this happening and how can this be addressed?
Thanks
SmartAssembly reports Windows 10 as Windows 8 under feature usage on my system. Why is this happening and how can this be addressed?
Thanks
Tagged:
Comments
After some digging, I found that no matter what, the OS version I was getting is 6.2.9200.0, which is Windows 8 (I'm using Windows 10):
So after further digging, I came across this: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx, specifically:
This leads on to https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241(v=vs.85).aspx. So I created an app.manifest for my test program, and hey presto:
So there's really two questions that need addressing here. The first is how we address OS detection in the .net framework, because the method we're using seems flawed. OSVersion has been deprecated, so it's questionable that we should be using this at all, but as above, with the appropriate files in place it works as intended.
However, the second thing that needs addressing is that the recommended best practice is to properly manifest your programs, and so perhaps we shouldn't be supporting those that don't use a manifest. That will require some more thought though.
I'm just repairing a pull request to fix the OS detection code based on using a manifest file, once released I'll update this post, and then I suggest you create an application manifest that includes the Windows 10 guid.
It's just a suggestion / a nice to have.
Currently, it displaying 10.0.15063.0 for me instead of 10.0.15063.296. 296 is my UBR.
Like the latest version on wikipedia https://en.wikipedia.org/wiki/Windows_10 it is 10.0.15063.296, with the 296 you know which monthly updates are installed on the machine.
Looking at this a little further, I'm not entirely sure its possible to get this UBR with how we're detecting the version information. UBR doesn't appear to be supported - every test I've run just pulls out .0. I'll speak to a colleague about it and see if we can do anything but if it needs a rewrite of the OS detection class I'm not sure we'll pursue it due to the knock on effects this could have.
@AndreL you're welcome.