Microsoft Windows Services/NT services, allow us to create long-running applications that run in the background repetitively without the need of any user interface or user interaction like Windows Forms Application, WPF Application, Console Application.
There are different ways to create Windows Services applications using the .NET Framework, but the one way is to use open source project Topshelf.
Topshelf is an open source Windows service framework for the .NET platform that makes it easy to create a Windows service.
Why would I use Topshelf to create Windows service?
Topshelf is an open source Windows service framework for the .NET platform that makes it easy to create a Windows service.
Why would I use Topshelf to create Windows service?
It makes it easy to create a Windows service as well as test the service, debug the service, and install it into the Windows Service Control Manager (SCM) with simple commands.
By using Topshelf, we don’t need to understand the complex details of service classes, perform installation via InstallUtil, or learn how to attach the debugger to services for troubleshooting issues.
With Topshelf, creating a Windows service is as easy as creating a console application. Once the console application is created, we need to create a single service class with public Start and Stop methods and configure asa service using Topshelf’s configuration API.
Now, we have a complete Windows service that can be debugged using the debugger (just by pressing F5) and installed using the Topshelf command (install/uninstall).
Here is link to Topshelf open source project documentation.
Following are the steps to create Windows service in .Net with Topshelf:





Guru PrasadPosted Nov 5, 2019, 6:04 AM
How to stop the service after finishing my task.(Automatically quit the service. No more execution). Is that possible then please let me know
Sushil KumarPosted Aug 8, 2019, 6:11 AM
For any assistance contact me at [email protected]
Amith BashaPosted May 9, 2018, 5:00 AM
How to get arguments while starting service?
Maninder SinghPosted Apr 13, 2018, 3:49 AM
Is there a way I can package this application as an MSI installer as deliverable so it can be installed as a windows service on client's machine?
Sibeesh VenuPosted Mar 7, 2016, 7:33 AM
Nice Share
Vignesh ManiPosted Mar 6, 2016, 12:14 PM
Good
Mohammed IbrahimPosted Mar 6, 2016, 9:56 AM
nice
Raja TPosted Mar 6, 2016, 2:16 AM
Nice, Thanks for sharing
Asfend YarPosted Mar 6, 2016, 1:45 AM
nice
Humayun Kabir MamunPosted Mar 6, 2016, 1:03 AM
Nice...
Ankit BansalPosted Mar 6, 2016, 12:58 AM
Topshelf is new to me..nice sharing..create more articles using topshelf..