UseWindowsService
This commit is contained in:
parent
8d039fc41d
commit
76d103e0ec
@ -33,6 +33,9 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Infineon.Monitoring.MonA" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="4.1.0" />
|
||||
<PackageReference Include="Serilog.AspNetCore.Ingestion" Version="1.0.0-dev-00021" />
|
||||
|
@ -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!");
|
||||
|
Loading…
x
Reference in New Issue
Block a user