相关疑难解决方法(0)

如何在安装后立即启动.NET Windows服务?

除了service.StartType = ServiceStartMode.Automatic我的服务在安装后没有启动

在我的ProjectInstaller上插入此代码

protected override void OnAfterInstall(System.Collections.IDictionary savedState)
{
    base.OnAfterInstall(savedState);
    using (var serviceController = new ServiceController(this.serviceInstaller1.ServiceName, Environment.MachineName))
        serviceController.Start();
}
Run Code Online (Sandbox Code Playgroud)

感谢ScottTx和Francis B.

.net installer windows-services

86
推荐指数
7
解决办法
9万
查看次数

如何在未安装Visual Studio的计算机上安装Windows服务?

安装Windows服务的唯一方法我知道是使用" Visual Studio 2008命令提示符 ",有没有办法在没有安装Visual Studio的机器上安装windows-service(假设.Net版本2.X是安装.)

.net c# windows-services

28
推荐指数
4
解决办法
4万
查看次数

标签 统计

.net ×2

windows-services ×2

c# ×1

installer ×1