将ClickOnce应用程序部署到多个服务器

问题描述:

我们正在使用 ClickOnce 部署来分发我们的应用程序。然而,由于带宽问题,我们需要将应用程序部署到网络上的多个服务器,而不仅仅是一个。

We're looking at using ClickOnce deployment as a means of distributing our application. However, due to problems with bandwidth, we would need to deploy the application to multiple servers on the network rather than just one.

我为一家银行工作,想要推出一个 WPF 客户端到我们所有的分支机构,但分支网络太慢,每天都有应用程序检查*服务器进行更新,尽管我们希望每次运行应用程序时检查它。每个分支机构都有自己的服务器,所以我希望能够将客户端部署到这些分支服务器,而不是主办公室的服务器。

I work for a bank and am wanting to roll out a WPF client to all of our branches, but the branch network is too slow to have the application check a central server each day for updates, although we do want it to check each time the application is run. Each branch has their own server, so I'd like to be able to deploy the client to these branch servers rather than a server here in the main office.

这是可能与ClickOnce有关?我必须使用命令行来执行此操作,方法是 MSBuild ,或者可以做到这一点来自 TFS Build project?

Is this possible to do with ClickOnce? Would I have to use the command line to do this with MSBuild or is it achievable to do this from within a TFS Build project?

我已经使用ClickOnce构建了通过Internet分发的商业产品。它是从单个服务器分发的,而不是在您的方案中的多个服务器。

I have built a commercial product that is distributed over the Internet using ClickOnce. It is distributed from a single server, though, not multiple servers as in your scenario.

我会说,你想做什么可以做到。问题是应用程序将需要知道哪个分支服务器检查更新,并且清单必须具有嵌入其中的部署URL(位于本地分支服务器)。因此,您似乎必须为每个分支服务器执行单独的构建。使用 MSBuild 进行自动化可能很简单,但我没有经验。

I'd say that what you want to do can be done. The problem is that the application will need to know which branch server to check for updates, and the manifest will have to have the deployment URL (on the local branch server) embedded in it. It therefore seems that you'll have to do a separate build for each branch server. It is probably easy to automate using MSBuild, but I have no experience with that.

有用的参考是智能客户端部署与Brian Noyes的ClickOnce

A useful reference is Smart Client Deployment with ClickOnce by Brian Noyes.