更改名称:ProjectInstaller.Designer.cs文件的
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.TCPMessageProcessorProcessInstaller = new System.ServiceProcess.ServiceProcessInstaller();
this.TCPMessageProcessorInstaller = new System.ServiceProcess.ServiceInstaller();
//
// TCPMessageProcessorProcessInstaller
//
this.TCPMessageProcessorProcessInstaller.Account = System.ServiceProcess.ServiceAccount.LocalSystem;
this.TCPMessageProcessorProcessInstaller.Password = null;
this.TCPMessageProcessorProcessInstaller.Username = null;
//
// TCPMessageProcessorInstaller
//
this.TCPMessageProcessorInstaller.Description = "程序描述";//程序的描述
this.TCPMessageProcessorInstaller.DisplayName = "tcprecserver";//在系统管理界面显示的服务名称
this.TCPMessageProcessorInstaller.ServiceName = "tcprecserver";//注册系统服务时使用的名称
this.TCPMessageProcessorInstaller.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
//
// ProjectInstaller
//
this.Installers.AddRange(new System.Configuration.Install.Installer[] {
this.TCPMessageProcessorInstaller,
this.TCPMessageProcessorProcessInstaller});
}
部署系统服务,必须是release文件,debug文件部署会失败