Geeks With Blogs
Gary Pronych 1 Part .NET Developer, 2 Parts Personal Developer; 100% Canadian

As a standard, we use ClickOnce to deploy all of our applications.

I don't want to get into all the benefits as I have discussed some in a previous post.

To summarize my scenario, I do software development for a 24 x 7 x 365 manufacturing plant.
Our systems must always be online and we must provide after hours support.

This week, one of our developers deployed an update to his end users.
It was not until 7 PM that the end user determined there was a significant bug in the application that could cause a mill delay. (Bad!)
I was on call and I was not at all familiar with this application, luckily the developer notified the team of this update and the fixes included. The bug was a part of one of these fixes, so I knew I could rollback to the previous version so the end user can continue his job and this new bug can be resolved during the next business day.

As a developer, you may consider something like
'grabbing the source code for the previous version, build it, and deploy'; which can be time time consuming.
With ClickOnce, you have 2 easy to use options.

1) Change the Version on the Client
- Ask the end user (or remote control) to navigate to the CONTROL PANEL -> ADD REMOVE PROGRAMS
- Scroll down the list of applications until you find your application name, in my case it is called RSA
- Click Change/Remove
- You will then have two options
a) Restore the application to its previous state
b) Remove the application from this computer

Select a) and the previous build will become the current version.
The caveat is the user must use Start -> All Programs -> Your Application Folder -> Your Application Name <RSA> to load the previous version.
They must run the application from the install folder to get the newest update.

This option works for a single client and is a temporary solution, what if a permanant rolback is required?

2) Change the Current Application Version
You have likely published a number of version of your application so you ClickOnce publish folder may look like this.

You will see in this picture, there are a number of <ApplicationName>_<version>.application files as well as folders.
There is only 1 application with the name <ApplicationName>.application, in this my scenario it is called RSA.application.

My latest build is 1_1_0_14, to restore to 1_1_0_12 I need to follow these steps
- delete RSA.application
- Make a copy of RSA_1_1_0_12.application and rename it RSA.application

The next time a user of this application attempts to load their application, they will be notified of an update. Once they select OK, they will be rolled back to 1_1_0_12.

Hope this helps,
Gary Pronych

Posted on Thursday, October 30, 2008 1:37 PM Forms Development , .NET , Tools | Back to top

Comments on this post: ClickOnce: Restore a Previous Version of an Application

# re: ClickOnce: Restore a Previous Version of an Application
Requesting Gravatar...
Thank You
Left by David on May 31, 2011 1:24 AM

Your comment:
 (will show your gravatar)

Copyright © Gary Pronych | Powered by: