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 instal
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.