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. ๐ธ
Shipped it as a NuGet until you get it in .NET Core.
https://github.com/icenorge/DotNetCore.WindowsServices/
https://www.nuget.org/packages/DotNetCore.WindowsServices/
Hope that's ok.