none
Auto update installs older version if current version is newer than update version

    Question

  • Why does the ClickOnce auto update think that there is a newer version available if the current version is actually newer than the version on the update site? 

    For example we're running 1.1 on the local machine and 1.0 is on the web in the update location folder.  When 1.1 starts, it checks the update location and sees that the version on the web is different from the current version and prompts the user that a new version is available.  If the user clicks "yes" to install the "new" version then the software in the update location is downloaded and the program is actually reverted back to the older version 1.0.

    Is this by design that the auto update check doesn't check if the current version is greater than the version in the update location and only checks to see if they're different?

     
     
    Tuesday, February 09, 2010 5:23 PM

Answers

  • Hi Mike,

    This answers a question I've long had, but never remember long enough to test it. But first, a question. Is your application online-only? Or is it offline/online?

    My guess would be that the auto-update check does, indeed check to see if they are different. The advantage this gives you is if you deploy a version and it has a problem, you can go to the web server and copy the .application file from the previous version and put it in the top-level folder, and it will revert people back to the last working version.

    I didn't think it did that -- I thought it would only advance.

    Unless you're running online-only, in which case I would understand why it's doing it this way.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Wednesday, February 10, 2010 8:19 AM
  • Hi Mike AE,

    ClickOnce handles updating based on the deployment version, not the file version. When updating to a new version, it will compare the signatures of both files, if they are different, the file will be updated. The updating does not care if the new version file is really newer than the old one. You can get details from:
    http://msdn.microsoft.com/en-us/library/ms404267.aspx

    Based on my understanding, this way is more flexible for us. For example, if we fix some bugs of our application and publish it. It is possible that one fixed bug brings lots of other issues that we want the users to use the old version of this component(might be only one dll). So that we will publish another new version for the users to update. If only new file can overlay the old one, the updating will fail since the component is older than last update version(we want the user to revert back). So I think the updating strategy used by ClickOnce is better.

    Regards,
    Aland Li


    Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
    Friday, February 12, 2010 6:47 AM

All replies

  • Hi Mike,

    This answers a question I've long had, but never remember long enough to test it. But first, a question. Is your application online-only? Or is it offline/online?

    My guess would be that the auto-update check does, indeed check to see if they are different. The advantage this gives you is if you deploy a version and it has a problem, you can go to the web server and copy the .application file from the previous version and put it in the top-level folder, and it will revert people back to the last working version.

    I didn't think it did that -- I thought it would only advance.

    Unless you're running online-only, in which case I would understand why it's doing it this way.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Wednesday, February 10, 2010 8:19 AM
  • It's an offline app published as install from cd-rom. 

    The problem is when we are testing a newer build version in house or we send it to a customer to try out, it always prompts to install the update even though we don't want to revert back to the older version during testing.
    Wednesday, February 10, 2010 2:44 PM
  • Hi Mike AE,

    ClickOnce handles updating based on the deployment version, not the file version. When updating to a new version, it will compare the signatures of both files, if they are different, the file will be updated. The updating does not care if the new version file is really newer than the old one. You can get details from:
    http://msdn.microsoft.com/en-us/library/ms404267.aspx

    Based on my understanding, this way is more flexible for us. For example, if we fix some bugs of our application and publish it. It is possible that one fixed bug brings lots of other issues that we want the users to use the old version of this component(might be only one dll). So that we will publish another new version for the users to update. If only new file can overlay the old one, the updating will fail since the component is older than last update version(we want the user to revert back). So I think the updating strategy used by ClickOnce is better.

    Regards,
    Aland Li


    Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
    Friday, February 12, 2010 6:47 AM
  • Hi Mike,

    I recommend using different URLs for testing in-house versus the version sent to customers.

    As noted by Aland, this is working as designed.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Saturday, February 13, 2010 7:32 AM