vs 服务做成安装包,如何安装以后启动服务,只要在类名为projectinstaller的类中重写commit事件即可 public override void Commit(IDictionary savedState) { base.Commit(savedState); ServiceController sc = new ServiceController("HttpProviderService");
补充: 在看下面的教程过程中,如果在下面的步聚1中没有 " Visual Studio Installer", 则需要通过下面的链接进行安装 Visual Studio Installer的安装链接: Microsoft Visual Studio 2015 Installer Projects - Visual Studio Marketplace https://marketplace.visualstudio.com/items?itemName=VisualStudioClie