From 76d103e0ec749320e3026d9e153e1959745a25c1 Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Tue, 29 Mar 2022 12:18:07 -0700 Subject: [PATCH] UseWindowsService --- APC Viewer/APC Viewer.csproj | 3 +++ APC Viewer/Program.cs | 1 + 2 files changed, 4 insertions(+) diff --git a/APC Viewer/APC Viewer.csproj b/APC Viewer/APC Viewer.csproj index 8d338d3..1eb3d8f 100644 --- a/APC Viewer/APC Viewer.csproj +++ b/APC Viewer/APC Viewer.csproj @@ -33,6 +33,9 @@ + + + diff --git a/APC Viewer/Program.cs b/APC Viewer/Program.cs index 67d2808..88b1ac1 100644 --- a/APC Viewer/Program.cs +++ b/APC Viewer/Program.cs @@ -18,6 +18,7 @@ public class Program if (string.IsNullOrEmpty(assemblyName)) throw new Exception(); WebApplicationBuilder webApplicationBuilder = WebApplication.CreateBuilder(args); + _ = webApplicationBuilder.Host.UseWindowsService(); AppSettings appSettings = Models.Stateless.AppSettings.Get(webApplicationBuilder.Configuration); if (string.IsNullOrEmpty(appSettings.WorkingDirectoryName)) throw new Exception("Working directory name must have a value!");