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 @@ + + + +