This is a simple service template to easilly install and debug a .Net Windows Service.
- Easy to install and Uninstall
- Easy to Debug.
You can specify the "Service Name", "Service Display Name", and "Service Descrition". Go to the Service.cs file, find 3 constants used by the service during the install process
//TODO: Setup more suitable names here
private const string serviceName = "WindowsService";
private const string serviceDisplayName = "Windows Service Template";
private const string serviceDescription = "Windows Service Description";
For install and uninstall after you compile the application use the following commands
Assuming your exe file name is Service.exe
Service.exe /i
Now go to the microsoft service console (services.msc) and you will see your service installed.
Service.exe /u
Service.exe /h
On Visual Studio, open the solution explorer, right click on the project, then click properties. In the properties window click on Debug tab and add a "/d" to the Command line arguments configuration.
Now run the project in debug mode and you will able to debug your code.