Adding a service installer and service process installer in visual studio

前端 未结 1 1428
盖世英雄少女心
盖世英雄少女心 2021-02-04 07:22

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

相关标签:
1条回答
  • 2021-02-04 07:51

    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.

    0 讨论(0)
提交回复
热议问题