DEV Community

Discussion on: Worker Service with .NET Core and ORMi

Collapse
 
katnel20 profile image
Katie Nelson

Does .UseWindowsService() run a Linux daemon and how do you get it to start/stop?

Collapse
 
nicoriff profile image
nicoriff

Hi Katie!. For using Worker Service as Linux daemon is pretty simple. Instead of installing Microsoft.Extensions.Hosting.WindowsServices, you got to install Microsoft.Extensions.Hosting.Systemd and instead of .UseWindowsService() just use .UseSystemd(). That´s it. Then you got to install it as preferred on your Linux environment.