Manually Rolling Back A WPF ClickOnce Application

If you need to revert to a previous ClickOnce version you are expected to redeploy that older version.

Recently I was in a situation where this wouldn’t work as there were checked in code changes that the environment was not ready for. Now I could have reverted to the previous version in TFS and then redeployed that. But luckily I found an easier way.

When you deploy a new ClickOnce version all the previous versions are stored on the server:

image

To use one of these versions modify your manifest (.application) file. Change the version number in the assemblyIdentity:

image

Further down in this file you’ll find the dependencyAssembly. You’ll need to change the path in the codebase, the version in the assemblyIdentity, as well as the DigestValue. This last value you’ll need to copy over from the manifest (.application file) that’s in your version directory.

image

Save your application manifest and you’re done!

When clients relaunch they’ll see they are no longer the latest version and they’ll re-update themselves.

Bradley Dean's Picture

About Bradley Dean

Certified Xamarin Mobile Developer with experience in Xamarin Forms, Ionic, Cordova, Phone Gap, ASP.Net MVC, Web Services, and sarcasm.

Atlanta, GA http://truegeek.com