65.9K
CodeProject is changing. Read more.
Home

Restore Application to Previous State using Clickonce

starIconstarIconemptyStarIconemptyStarIconemptyStarIcon

2.00/5 (4 votes)

Oct 8, 2006

CPOL

1 min read

viewsIcon

36960

This article will show you how to restore an application to its previous version using Clickonce

Introduction

Here is some cool stuff to recover a Windows application to its previous version using "ClickOnce".

Remember whenever ClickOnce applications are installed as offline, an entry is added to the Add and Remove Programs. Whenever you click on Change/Remove in addition to letting the user uninstall the application, it also allows the user to roll back to previous versions of the application. ClickOnce retains one past version of the application for the user to revert to in this way, but the option of restoring an application to the previous state is disabled by default as shown in the following figure:

Sample screenshot

To enable the option of restoring an application to the previous version, follow the steps outlined below:

  1. Right click on Project in Solution Explorer and select Properties. In Properties, select Publish tab as shown below:

Sample screenshot

  1. Click on Updates… button, you will see the following screen:

Sample screenshot

  1. Select specify a minimum required version option as shown in the above figure.
  2. Make sure the revision number is equal to your current version (before publishing).
  3. Click on OK and publish application.
  4. Now you can restore your application to the previous version as option is enabled as shown in the following figure:

Sample screenshot

MinimumRequiredVersion - specifies the minimum version of this application that can run on the client. If the version number of the application is less than the version number supplied in the deployment manifest, the application will not run.

History

  • 8th October, 2006: Initial post