aspnet/Hosting

Question: RunAsService for non web-apps

johnkors opened this issue ยท 6 comments

Hi,

What would be the equivalent of host.RunAsService() for regular .NET Core (non-web, no ASP.NET Core/Kestrel)-apps..?

Do you have minimal sample of a host that does this? All samples I've seen are centered around hosting ASP.NET Core as a Windows Service, but I only want a IHostedService to run background tasks - no Kestrel or WebHosts needed.

Thanks!

So to get this part running, I'd need to implement the the ServiceBaseLiftetime as in the sample ? Any reason for it not being part of a NuGet somewhere instead of the samples..?

Because we haven't gotten to that part yet ๐Ÿ˜„

Hah. Fair enough. ๐Ÿ˜ธ