安装时发现如下异常
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
报这个错的原因是
this.Installers.AddRange(new System.Configuration.Install.Installer[] {
this.serviceInstaller1
,this.serviceProcessInstaller1});
在这里没有,this.serviceProcessInstaller1,
手动加上即可