diff --git a/Directory.Build.props b/Directory.Build.props index 37b63badc..1415521cf 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -56,7 +56,7 @@ - + all runtime; build; native; contentfiles; analyzers diff --git a/Greenshot/Greenshot.csproj b/Greenshot/Greenshot.csproj index 1b25c59a2..080651ceb 100644 --- a/Greenshot/Greenshot.csproj +++ b/Greenshot/Greenshot.csproj @@ -17,7 +17,7 @@ - + diff --git a/GreenshotPlugin/Core/WindowsVersion.cs b/GreenshotPlugin/Core/WindowsVersion.cs index 6dd4faa08..cd263d518 100644 --- a/GreenshotPlugin/Core/WindowsVersion.cs +++ b/GreenshotPlugin/Core/WindowsVersion.cs @@ -41,7 +41,7 @@ namespace GreenshotPlugin.Core public static bool IsWindows7OrLater { get; } = WinVersion.Major == 6 && WinVersion.Minor >= 1 || WinVersion.Major > 6; public static bool IsWindows7OrLower { get; } = WinVersionTotal <= 6.1; - + /// /// Test if the current OS is Windows 8.0 /// @@ -102,6 +102,11 @@ namespace GreenshotPlugin.Core /// true if we are running on Windows XP or later public static bool IsWindowsXpOrLater { get; } = WinVersion.Major >= 5 || WinVersion.Major == 5 && WinVersion.Minor >= 1; + /// + /// Returns the windows build number + /// + public static int BuildVersion => WinVersion.Build; + /// /// Test if the current Windows version is 10 and the build number or later /// See the build numbers here diff --git a/GreenshotPlugin/GreenshotPlugin.csproj b/GreenshotPlugin/GreenshotPlugin.csproj index 1a9598bc0..574e0fafc 100644 --- a/GreenshotPlugin/GreenshotPlugin.csproj +++ b/GreenshotPlugin/GreenshotPlugin.csproj @@ -15,7 +15,7 @@ - + diff --git a/GreenshotWin10Plugin/Win10Plugin.cs b/GreenshotWin10Plugin/Win10Plugin.cs index 1e0519071..53344f391 100644 --- a/GreenshotWin10Plugin/Win10Plugin.cs +++ b/GreenshotWin10Plugin/Win10Plugin.cs @@ -35,7 +35,9 @@ namespace GreenshotWin10Plugin [Plugin("Win10", false)] public sealed class Win10Plugin : IGreenshotPlugin { - public void Dispose() + private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(typeof(Win10Plugin)); + + public void Dispose() { Dispose(true); } @@ -58,8 +60,10 @@ namespace GreenshotWin10Plugin /// true if plugin is initialized, false if not (doesn't show) public bool Initialize() { - if (!WindowsVersion.IsWindows10OrLater) + // Here we check if the build version of Windows is actually what we support + if (!WindowsVersion.IsWindows10BuildOrLater(17763)) { + Log.WarnFormat("No support for Windows build {0}", WindowsVersion.BuildVersion); return false; }