我在一个应用程序中有两个服务。第二个不想要开始;
static void Main(string[] args)
{
System.Diagnostics.Debugger.Launch();
ControlService controlService = ControlService.Instance;
CommService commService = CommService.Instance;
ServiceBase[] servicesToRun = new ServiceBase[]{controlService, commService };
ServiceBase.Run(servicesToRun);
}
我更改了服务的顺序,并且第二个服务始终没有启动