diff --git a/Greenshot/App.config b/Greenshot/App.config index 0b1f5ce4d..d4ff71058 100644 --- a/Greenshot/App.config +++ b/Greenshot/App.config @@ -1,7 +1,7 @@ - + - + diff --git a/Greenshot/Greenshot.exe.config b/Greenshot/Greenshot.exe.config index 0b1f5ce4d..4543c429f 100644 --- a/Greenshot/Greenshot.exe.config +++ b/Greenshot/Greenshot.exe.config @@ -1,7 +1,7 @@  - + diff --git a/Greenshot/Helpers/EnvironmentInfo.cs b/Greenshot/Helpers/EnvironmentInfo.cs index 9f89a0e75..6fd983970 100644 --- a/Greenshot/Helpers/EnvironmentInfo.cs +++ b/Greenshot/Helpers/EnvironmentInfo.cs @@ -48,6 +48,11 @@ namespace Greenshot.Helpers { } } + public static bool IsNet45OrNewer() { + // Class "ReflectionContext" exists from .NET 4.5 onwards. + return Type.GetType("System.Reflection.ReflectionContext", false) != null; + } + public static string EnvironmentToString(bool newline) { StringBuilder environment = new StringBuilder(); environment.Append("Software version: " + Application.ProductVersion); @@ -62,6 +67,10 @@ namespace Greenshot.Helpers { environment.Append(", "); } environment.Append(".NET runtime version: " + Environment.Version); + if (IsNet45OrNewer()) { + environment.Append("+"); + + } if (newline) { environment.AppendLine(); } else {