https://zhidao.baidu.com/question/380395667.html
//多服务一个宿主程序时必须注间以下要点:
Service1的ServiceName 必须 Installer1.Designer.cs 中的 serviceInstaller1.ServiceName 完全一致
//this.ServiceName MUST match this.serviceInstaller1.ServiceName in Installer1.Designer.cs file
//this.ServiceName MUST match this.serviceInstaller2.ServiceName in Installer1.Designer.cs file
//this.ServiceName MUST match this.serviceInstaller3.ServiceName in Installer1.Designer.cs file
//serviceInstaller1中的代码
//this.serviceInstaller1.ServiceName = "Win32MultiServices1";
//Service1中的代码
//this.ServiceName = "Win32MultiServices1"
2.ServiceName已经一样 还是只能启动一个
代码对比,少了一个Installer,不是主要原因
this.Installers.AddRange(new System.Configuration.Install.Installer[] {
this.serviceProcessInstaller1,
this.serviceInstaller1});
this.Installers.AddRange(new System.Configuration.Install.Installer[] {
this.serviceProcessInstaller1,
this.serviceInstaller1,
this.serviceInstaller2});
1.改变显示名称,描述
2.删除所有Installer重新添加