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.
  • Anthony

    Hey thanks for this. Having the same problem in VS2013RC and .NET 4.

    • Your welcome. I guess its nice to see they’re consistent? :-/

  • Pinusno

    Many thanks, You saved me a lot of time. I had the same issue with VS2013. I think the Problem is the AddRange, which was added 2 times for the service and processInstaller. So normaly they had to change the Designer-Code to:
    this.Installers.Add

    otherwise it will be overwritten with:
    this.Installers.AddRange

  • SomeSubjectiveSomeObjective

    Nice. Had the same issue on VS 2013 and your link sorted it out quickly 🙂

  • Rick LaCourse

    Same problem with VS2015 and .NET 4.6. Solution worked perfectly. Many thanks.

  • Fane Duru

    It works also in my project (VS2013). Thanks!