views:

158

answers:

3

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.

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 app 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.

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?

Thanks

+1  A: 

Yes. It is possible to deploy using MSBuild (which is part of .Net framework 2.0+). See examples here.

Vasiliy Borovyak
+1  A: 

AFAIK, If you simply sync the setup files from a central location to the branch servers, your clients should be able to run/check/update from these

goorj
Yeap. Good idea!
Vasiliy Borovyak
I've just tried deploying to a server, copying the published files over to my local machine and running the installer from localhost, however, it still retrieves the setup files from the server rather than using the local copy. The application must always use the URL from the manifest when installing / checking for updates, which isn't much use in my situation. Ho hum, time to rethink the strategy!
TabbyCool
I admit I do not have much knowledge about the details of ClickOnce, manifests etc. What I did was deploy to a local share and then moved the files outside the LAN - where the share was not accessible. I never had any problems.
goorj
TabbyCool, you have to edit deployment manifest of course (change the update uri)! Use MageUI tool. You even can automate copy-to-branch-location process using mage command-line tool.
Vasiliy Borovyak
+1  A: 

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

I'd say that what you want to do can be done. The problem is that the app 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 seperate build for each branch server. Probably easy to automate using MSBuild, but I have no experience of that.

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

Andy Johnson
Thanks, I think publishing to a central server then copying the files over to each branch server would be easier - we have over 30 branches so having a build for each one would be a little cumbersome. I'm not sure if this would work though, as you said, the client will need to know which server to check for updates - I'll have to try this on a couple of PCs in the office and see what happens!
TabbyCool