Hosting .netcoreapp1.0 as windows service


Hi, I’m trying to deploy my .net core application as a windows service (later on as a Linux daemon). I tried to use SC create binpath=“dotnet path\to\published.dll”. Service created but fails to start throwing an error 1503.
I tried Anyservice but it starts silently without any logs, that I expect to be written in file at start. Top shelf isn’t available for .netcore.
What options do I have, I need my console app to be restored in case of crash. Stopped in case of re-deploy. In other words, everything that usually done by Windows service.


This thread on github might give you some resources about services in windows with dot net core.


Hello, take a look at these. I Ended up implementing something that works pretty much like very (very) simplified Topshelf. You can easily run as console and/or install, uninstall and so one as a service. I think it can be pretty useful for somebody. You can find the code here : and there’s nuget here as well . Enjoy :slight_smile:

.NET Foundation Website | Blog | Projects | Code of Conduct