Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a service installer and service process installer in visual studio

For some reason, after adding a Installer class to my Windows Service project, I open it up in design mode and right click, but there is no option to add either a service installer or a service process installer. Does anyone know why this may be the case?

like image 224
Trevor Avatar asked Jun 23 '11 21:06

Trevor


1 Answers

In both Visual Studio 2008 and 2010, the best way to do this is to open the ServiceBase component (named Service1 by default) in design mode. Then, right-click in the designer and select the Add Installer option. This adds a ProjectInstaller component along with the necessary assembly references. The ProjectInstaller component, in turn, has the service installer and service process installer added automatically.

Without additional detail, my best guess is that you manually added a component/class to your project and named it Installer instead of letting Visual Studio do the work for you.

See my post here for how to create a basic service in Visual Studio 2008 (seems to work in 2010 as well). Pay particular attention to Step 6.

Hope this helps.

like image 115
Matt Davis Avatar answered Sep 17 '22 19:09

Matt Davis