Debugging: Install/Deinstall Services within Visual Studio
To run a service you actually need to compile it and install it with InstallUtil.exe. To make this process faster you can easily add this function to Visual Studio.
Go to “Tools\External Tools….” and add following:
Title
Install Service
Command
C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe
Arguments
$(TargetPath)
Initial directory
$(TargetDir)
Use Output Window
Should be selected
To uninstall the service Add following:
Title
Uninstall Service
Arguments
/u $(TargetPath)
Initial directory
$(TargetDir)
Use Output Window
Should be selected