[英]How to deploy multiple applications together
I have the following: 我有以下几点:
Both client and agent can't function without the service. 没有服务,客户端和代理都无法运行。 Our current installation is using ClickOnce
(the service is not yet deployed). 我们当前的安装正在使用ClickOnce
(该服务尚未部署)。
What I want: 我想要的是:
ClickOnce
is very nice but not mandatory. ClickOnce
非常好,但不是强制性的。 If there are better solutions to meet my requirements, I will switch to them, providing that update is still possible (force update as well as an option to delay update). 如果有更好的解决方案可以满足我的要求,我将切换到它们,前提是仍然可以进行更新(强制更新以及延迟更新的选项)。
I'll address the ClickOnce approach. 我将介绍ClickOnce方法。 An msi install might be more appropriate, but it sounds as though you want some sort of auto-updating. 安装msi可能更合适,但听起来好像您想要某种自动更新。 It might be easier to force your windows service install into a ClickOnce approach rather than make an msi install self-updating. 将Windows服务强制安装为ClickOnce方法可能比使msi安装进行自我更新更容易。
ClickOnce, at its core, is simple. ClickOnce的核心很简单。 It keeps files in a user's profile folder in sync with files on a server. 它可以使用户配置文件文件夹中的文件与服务器上的文件保持同步。 This should work great for the Client and Agent apps. 这对于客户端和代理应用程序应该非常有用。 Not so much for the windows service. Windows服务不多。
For the service I would have ClickOnce deploy the service bits. 对于服务,我将让ClickOnce部署服务位。 Then write code that will execute in the Client/Agent to install/update the service. 然后编写将在客户端/代理中执行的代码以安装/更新服务。
I've found Topshelf to be pure awesome when working with services. 我发现Topshelf在使用服务时确实很棒。 It lets you write a standard console app which makes development easier. 它使您可以编写标准的控制台应用程序,从而使开发更加轻松。 Then to install it you can call the console exe and pass an --install
switch. 然后要安装它,您可以调用控制台exe并传递--install
开关。 I think you could have that code execute whenever the Client/Agent starts and copy files, install/update/start/stop the service, and whatever else is necessary to make your service work. 我认为,只要客户端/代理启动并复制文件,安装/更新/启动/停止服务以及使服务正常工作所需的任何其他操作,您就可以执行该代码。
Now for your numbered list... 现在为您的编号清单...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.