Is there a way to develop a windows service (able to start on boot etc...) with .NET Core?
All tutorials and instructions I find utilize System.ServiceProcess.ServiceBase which can not be found and added for some reason in Visual Studio 2015?
I also try to avoid using 3rd party tools/libraries like SrvStart. Something like Topshelf would be acceptable but seems to be not available for .NET core.
And it would be great if the service could run under windows and linux.
Any ideas how I could achieve this?
NET Core and . NET 5+, developers who relied on . NET Framework could create Windows Services to perform background tasks or execute long-running processes. This functionality is still available and you can create Worker Services that run as a Windows Service.
NET 5.0 SDK versions will continue to be supported in VS 16.11 until December of 2022 when . NET Core 3.1 goes out of support so that . NET Core 3.1 customers can continue to use 16.11 to developer their applications.
An ASP.NET Core app can be hosted on Windows as a Windows Service without using IIS. When hosted as a Windows Service, the app automatically starts after server reboots.
I'll summarise some options:
ServiceBase
. This will of course need the .NET Framework to be installed on the target machineIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With