Installation failed due to the absence of a ServiceProcessInstaller.

Recently I encountered the following error message while creating a new windows service in .net :

System.InvalidOperationException: Installation failed due to the absence of a ServiceProcessInstaller. The ServiceProcessInstaller must either be the containing installer, or it must be present in the Installers collection on the same installer as the ServiceInstaller.

After doing some searching I found that this was due to the designer not wiring up the ServiceInstaller correctly. To fix this you’ll need to go into the InitializeComponent() of the Installer.Designer.cs file and make the following change manually. (I saw no way to fix this through the designer.)

Please note, this was with Visual Studio 2012 and .net 4.0.

Mike GriffithInstallation failed due to the absence of a ServiceProcessInstaller.