Change the deployment URL of a ClickOnce application

I use ClickOnce everyday for several internal applications. Recently, I had to move the publishing website to a new host.
Here is how you can acheive a completely transparent move without annoying your users or forcing them to uninstall and reinstall the application.

First, you need to publish the deployment files on the new server. The deployment configuration is as follows :
  • Publishing folder : URL on the new server
  • Installation Folder : URL on the new server
  • Updates Folder : URL on the new server
  • Revision : last revision + 2 (very important)

Then you need to deploy a new version on the old server with an updates folder on the new server. This way, next time the application launches, it will get the new version from the new server, and voila. Here is the configuration for the last deployment on the old server :
  • Publishing folder : URL on the old server
  • Installation Folder : URL on the old server
  • Updates Folder : URL on the new server
  • Revision : last revision + 1 (very important)
Enjoy :)

Comments

  1. This post helped me a lot! Thanks so much

    -Tom

    ReplyDelete
  2. Works like a charm, thanks for sharing your genius.

    ReplyDelete
  3. This works, too (without manually changing revision numbers): http://stackoverflow.com/questions/174764/how-to-move-a-clickonce-deployment-package#answer-174826

    ReplyDelete
  4. What about the shortcut in start menu? Will it be updated? I tried this way, but the shortcut pointed to the old place after update.

    ReplyDelete

Post a Comment

Popular posts from this blog

Create a draft release and start it using the TFS REST API

Adding a delay before processing Textbox events