79550694

Date: 2025-04-02 13:05:15
Score: 1
Natty:
Report link

for .Net 8 you should add package 'Microsoft.Extensions.Hosting.WindowsServices' and add UseWindowsService(). It's activate only if it detects the process is running as a Windows Service.

IHost host = Host.CreateDefaultBuilder(args)
   .UseWindowsService()
   .... 
  .Build();
await host.RunAsync();
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Aleksei Beliaev