Application does not respect the system color settings due to bad detection by SystemColorsSupported
See original GitHub issueIf I try to use the library in my .NET Core 3.1 project, the system color settings is not respected when running from Visual Studio or directly from exe. This is not a problem in JetBrains Rider IDE. The issue is that Environment.OSVersion.Version (used in ColorsHelper.SystemColorsSupported) shows version 6.2.9200 but the library tests Major version for >=10, which can’t happen. This could happen because of this: https://docs.microsoft.com/en-US/windows/win32/sysinfo/targeting-your-application-at-windows-8-1 (https://www.prugg.at/2019/09/09/properly-detect-windows-version-in-c-net-even-windows-10/).
I found out a temporary workaround by adding app.manifest to the project (right click on project in solution explorer -> Add -> New item… -> Application Manifest File (Windows only)) and then uncommenting line <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:10 (6 by maintainers)
If the info about the need of
app.manifest
and how to add it properly is added to README, it will reduce confusion and will be helpful to new users.The requirement of app.manifest has been removed by 2c27fba9.