How Do You Set Windows Service Properties in .Net Core?

Viewed 32

I've been a long term user and fan of using background Windows Services. I've had the old way of coding and installing them down pat for years, but of course with .Net Core, things are now vastly different.

I love the way the use of dependency injection lets you jump into the middle of all sorts of processing pipelines. This gives an awesome amount of flexibility to the developer, but it can be hard to discover just what you can do through such extensions.

I have not been able to find an example of how to set the various properties of a Windows Service through this new mechanism. I want to be able to set properties like the ServiceName, the DisplayName, the Description, the AutoRestartDelay, etc.

Thanks in advance for any links or even just a mention of the ASP.Net Core interface or classes that give me access to these properties from my code.

0 Answers
Related