Countly / Countly/countly-sdk-windows
Windows 10 version being reported as Windows 8 under .NET Core
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 26
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
Bug
The netstd project for countly-sdk-windows uses Environment.OSVersion to request the version of Windows (instead of System.Management like the .NET Framework SDK uses).
Under some installations of Windows 10, this function returns an OS version which is interpreted as Windows 8:
{Microsoft Windows NT 6.2.9200.0}
Consequently the metrics in Countly all show the OS users as Windows 8 users (even though they are usingWindows 10)
This bug is in ...\Entities\Device.cs's getOSInfo() function. This bug appears to be affecting more than half of our users.
Tested under
Tested under: Windows 10 Pro x64 (May 2020 update), under Parallels
Proposed resolution
As .NET Core now supports System.Management (and since I have confirmed that System Management does return the correct version # under Windows 10 and .NET Core), I recommend that the Countly SDK for Windows add the System.Management nuget package to the netstd project and reuse the pre-existing System.Management query code instead.
Notes from Microsoft on Environment.OSVersion (.NET Core 3.1 docs)
"The Environment.OSVersion property does not provide a reliable way to identify the exact operating system and its version. Therefore, we do not recommend that you use this method."
https://docs.microsoft.com/en-us/dotnet/api/system.environment.osversion?view=netcore-3.1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Entities/Device.cs at getOSInfo() and inspect the existing System.Management query code used by the .NET Framework SDK, along with the netstd project configuration. Replace the unreliable version lookup with the supported approach and verify that Windows 10 is reported as Windows 10 in Countly metrics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100