From 4b105c81b8f2f09c5488005d0c428bcb9e13586b Mon Sep 17 00:00:00 2001 From: RDeck Date: Tue, 11 Nov 2025 04:24:46 -0500 Subject: [PATCH] ! --- ClassObj/ServiceMain.cs | 11 ++++++++++- kmCustomReportsNET.csproj | 9 ++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ClassObj/ServiceMain.cs b/ClassObj/ServiceMain.cs index f4bfc7f..8d92ee0 100644 --- a/ClassObj/ServiceMain.cs +++ b/ClassObj/ServiceMain.cs @@ -13,11 +13,20 @@ internal class ServiceMain : ServiceControl { ILog appLog = LogManager.GetLogger(Program.AppName); ConcurrentBag tasks = new(); + Version? AssemblyVersion = null; public bool Start(HostControl hostControl) { + try + { + AssemblyVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; + } + catch + { + AssemblyVersion = new Version("1.0"); + } tasks.Add(Task.Run(() => { Looper(); })); - appLog.Info(string.Format("Service successfully started.")); + appLog.Info(string.Format("Service successfully started - v{0}", AssemblyVersion.ToString())); return true; } //Start diff --git a/kmCustomReportsNET.csproj b/kmCustomReportsNET.csproj index d96a2fe..316d57e 100644 --- a/kmCustomReportsNET.csproj +++ b/kmCustomReportsNET.csproj @@ -1,10 +1,13 @@ - + Exe net9.0-windows enable enable + 1.3.0.5 + 1.3.0.5 + 1.3.0.5 @@ -20,4 +23,8 @@ + + + +