From 065aeb67ca02036623d0d49bcc3be1364fd67242 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 4 Jan 2021 13:08:00 +0800 Subject: [PATCH] feature: show .NET framework version used by this application --- src/UI/About.xaml.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/UI/About.xaml.cs b/src/UI/About.xaml.cs index 613133c5..55948d98 100644 --- a/src/UI/About.xaml.cs +++ b/src/UI/About.xaml.cs @@ -1,3 +1,4 @@ +using System; using System.Diagnostics; using System.Reflection; using System.Windows; @@ -17,7 +18,10 @@ namespace SourceGit.UI { InitializeComponent(); var asm = Assembly.GetExecutingAssembly().GetName(); - version.Content = $"VERSION : v{asm.Version.Major}.{asm.Version.Minor}"; + var framework = AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName; + var dotnetVer = framework.Substring(framework.IndexOf("=") + 1); + + version.Content = $"VERSION : v{asm.Version.Major}.{asm.Version.Minor} .NET : {dotnetVer}"; } ///