From 4e0440360d2fcaef7a9ad8c18c72e345e2f57626 Mon Sep 17 00:00:00 2001 From: Coen van den Munckhof Date: Thu, 5 Sep 2024 20:06:55 +0200 Subject: [PATCH] Show current version (using nbgv) in help page (#150) --- src/RepoM.App/ViewModels/HelpViewModel.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/RepoM.App/ViewModels/HelpViewModel.cs b/src/RepoM.App/ViewModels/HelpViewModel.cs index ce82d0de..612c3592 100644 --- a/src/RepoM.App/ViewModels/HelpViewModel.cs +++ b/src/RepoM.App/ViewModels/HelpViewModel.cs @@ -21,8 +21,7 @@ public HelpViewModel(ITranslationService translationService) private static string GetHeader() { - AssemblyName? appName = Assembly.GetEntryAssembly()?.GetName(); - return appName?.Name + ' ' + appName?.Version?.ToString(2).Trim(); + return ((Assembly.GetEntryAssembly()?.GetName().Name ?? ThisAssembly.AssemblyName) + " " + ThisAssembly.AssemblyInformationalVersion).Trim(); } private static string GetHelp(ITranslationService translationService)