【发布时间】:2013-09-09 21:02:26
【问题描述】:
我正在尝试使用微软的这个教程....here
我无法让 installutil 安装它...我不断收到“删除 InstallState 文件,因为没有安装程序。”
exe中显然有一个安装程序....这是我的代码中存在的安装程序:
// Provide the ProjectInstaller class which allows
// the service to be installed by the Installutil.exe tool
[RunInstaller(true)]
public class ProjectInstaller : Installer
{
private ServiceProcessInstaller process;
private ServiceInstaller service;
public ProjectInstaller()
{
process = new ServiceProcessInstaller();
process.Account = ServiceAccount.LocalSystem;
service = new ServiceInstaller();
service.ServiceName = "WCFWindowsServiceSample";
Installers.Add(process);
Installers.Add(service);
}
}
}
在这一点上这很烦人。如果有人可以查看非常简单的 Microsoft 文章,我将不胜感激。有了安装程序,我不知道为什么 installutil 找不到它。
是的,我正在以管理员身份运行 Visual Studio 命令提示符来执行此操作。
【问题讨论】:
-
是否有更多信息输出,或者只是“Remove InstallState...”消息?
标签: c# windows windows-services