How can I roll-back a ClickOnce application?

30,357

Solution 1

ClickOnce will use whatever version you send them. If you send them an old version, they will rollback to that old version.

Back in May my buddy David wrote an article on how to do this on a per-user basis. We can literally have every user on a different version. The application even tells the database which version the user wants, so they could in theory change their version and then simply restart the application.

Fine Grained Versioning with ClickOnce

Solution 2

You can go in Add/Remove application and select your application and choose to get the last installation instead.

Solution 3

You can use MAGEUI to rollback to a previous manifest version on the server. Check this out.

Solution 4

If you look at your deployment location, you'll see every previous version, in a separate folder with the version number appended, as well as the deployment manifest, also with the version number appended.

You can rename any one of them to be the current deployment, and the next time you update that application, it'll pull in the version you rolled-back to.

Share:
30,357
Jan Bannister
Author by

Jan Bannister

I'm just a lowly developer :)

Updated on July 23, 2022

Comments

  • Jan Bannister
    Jan Bannister almost 2 years

    Is there a way (hacky will do) to allow a user to go back to a previous version of a ClickOnce network deployed application?

    I've looked in the docs and API and there seems to be no way. You can selectively choose if you would like to update, but once updated there is, seemingly, no way back.

  • Jan Bannister
    Jan Bannister over 15 years
    Cheers, That looks like a nice approach!
  • The Muffin Man
    The Muffin Man over 9 years
    I don't know if that would work. The deployment manifest has a path to the application manifest, but the app manifest I believe has a version in it as well. You also can't just update it without resigning.
  • Derreck Dean
    Derreck Dean over 7 years
    You can, provided (a) the currently installed version has never had the minimum required version set in the manifest, and (b) the possibility of not being able to read the previous version's app settings. See my comment on this answer stackoverflow.com/a/273719/607117 for more information about that last point.