简体   繁体   English

使用 InstallUtil 命令安装 Windows 服务失败

[英]Install Windows service failing with InstallUtil command

I'm trying to install a Windows service which I've built in Visual Studio.我正在尝试安装我在 Visual Studio 中构建的 Windows 服务。 I'm publishing the service to a local folder and when I'm trying to do the setup I'm getting this error:我正在将服务发布到本地文件夹,当我尝试进行设置时,出现此错误:

在此处输入图片说明

Then, I'm navigating to the VS2013 console, and I'm trying to run the InstallUtil command but this is the error I'm getting:然后,我导航到 VS2013 控制台,并尝试运行 InstallUtil 命令,但这是我收到的错误:

在此处输入图片说明

The app doesn't have any dependencies and its local solution.该应用程序没有任何依赖项及其本地解决方案。 There are no DLLs included and this is the content of the output folders:不包含 DLL,这是输出文件夹的内容:

在此处输入图片说明

在此处输入图片说明

The application is built in vs2013, using .net framework 4.5.该应用程序是在 vs2013 中构建的,使用 .net 框架 4.5。 What am I missing?我错过了什么?

If you are creating a ClickOnce app, the build process creates a .application file which is a "manifest" of the files needed to install the application.如果您正在创建 ClickOnce 应用程序,则构建过程会创建一个 .application 文件,该文件是安装应用程序所需文件的“清单”。 double-clicking the .application file will install the application, including any .exe files.双击 .application 文件将安装该应用程序,包括任何 .exe 文件。

But, you cannot deploy a Windows Service with ClickOnce .但是,您不能使用 ClickOnce 部署 Windows 服务 ClickOnce deployments executed in a much lower set of privileges than a classical install (Windows Installer). ClickOnce 部署以比经典安装 (Windows Installer) 低得多的一组权限执行。 If you need to deploy a Windows Service you're going to have to use Windows Installer technology with the Windows Installer framework of your choice (eg WiX).如果您需要部署 Windows 服务,则必须将 Windows Installer 技术与您选择的 Windows Installer 框架(例如 WiX)配合使用。 See http://msdn.microsoft.com/en-us/library/ms973805.aspx for more details on what ClickOnce suports有关 ClickOnce 支持的内容的更多详细信息,请参阅http://msdn.microsoft.com/en-us/library/ms973805.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM