diff --git a/CHANGELOG.md b/CHANGELOG.md index d9760fe44..d656dafcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Changed +- [SIL.Core] Enhanced ErrorReport.GetOperatingSystemLabel method to report Windows 11+ and list the version as well. - [SIL.Core] Enhanced RetryUtility.Retry methods to optionally improve debugging messages, and fixed existing RobustFile and RobustIO methods to use the new optional debugging parameter - [SIL.Media] Changed the FrameRate reported in VideoInfo from FrameRate to AvgFrameRate. - [SIL.Windows.Forms] Fixed spelling error in ImageGalleryControl, renaming SetIntialSearchTerm to SetInitialSearchTerm. diff --git a/SIL.Core/Reporting/ErrorReport.cs b/SIL.Core/Reporting/ErrorReport.cs index a26877937..eaa6401d1 100644 --- a/SIL.Core/Reporting/ErrorReport.cs +++ b/SIL.Core/Reporting/ErrorReport.cs @@ -460,7 +460,14 @@ public static string GetOperatingSystemLabel() foreach (var version in list) { if (version.Match(Environment.OSVersion)) - return version.Label + " " + Environment.OSVersion.ServicePack; + { + // From: https://stackoverflow.com/questions/69038560/detect-windows-11-with-net-framework-or-windows-api + if (version.Label == "Windows 10" && Environment.OSVersion.Version.Build >= 22000) + { + return "Windows 11+ " + Environment.OSVersion.ServicePack + " (" + Environment.OSVersion.Version + ")"; + } + return version.Label + " " + Environment.OSVersion.ServicePack + " (" + Environment.OSVersion.Version + ")"; + } } // Handle any as yet unrecognized (possibly unmanifested) versions, or anything that reported its self as Windows 8.