的ClickOnce部署Windows服务? [英] ClickOnce deploy a Windows Service?

查看:406
本文介绍了的ClickOnce部署Windows服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能部署Windows服务使用ClickOnce一个?如果是这样,你是怎么做到这一点?

Is it possible to deploy a Windows Service using ClickOnce? If so, how do you achieve this?

目前,我们有使用部署的项目,并在安装过程中可以大大通过使用ClickOnce简化。

Currently we have to use a Deployment project, and the installation process could be simplified greatly by using ClickOnce.

推荐答案

AFAIK你不能真正使用的ClickOnce端至端部署服务;有与两个文件位置的问题(的ClickOnce安装到用户的配置文件)和安装(ClickOnce是的主要无副作用)。

AFAIK you can't really use ClickOnce end-to-end to deploy a service; there are issues with both the file locations (ClickOnce installs into a user's profile) and installation (ClickOnce is largely side-effect free).

您可以,但是,写一个服务作为一个exe从服务列表中,可以自行安装/卸载,<一个href=\"http://stackoverflow.com/questions/255056/install-a-net-windows-service-without-installutil-exe\">like所以;基本上,你写它作为一个控制台EXE和处理一些命令行参数,使用 AssemblyInstaller 来(联合国)从目前的集安装。另一个优点是,同样的方法可以用来帮助调试,因为你可以在命令行中运行它。

You can, however, write a service as an exe that can self-install/uninstall from the services list, like so; basically, you write it as as a console exe and handle some command line args, using AssemblyInstaller to [un]install from the current assembly. Another advantage is that the same approach can be used to help debugging, since you can run it from the command line.

这篇关于的ClickOnce部署Windows服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆