简体   繁体   中英

Clickonce madness

Ok I'm about to go insane.

We have a package we deploy to our UAT users through clickonce, providing them a URL to download it from via an HTML page link. Until recently we didn't version any of the packages so they all had version 1.0.0.0 - the net result was when we released a new version to UAT, they had to get the old one uninstalled before they could download the new one as it thought they were the same application identity otherwise. As they do not have admin access, this was a bit problematic and resulted in them having to delete the files in c:\\documents and settings\\username...... for clickonce and remove registry entries,

The last version they installed was UAT 5. I have now built a version of UAT 6 which has version 6.0.0.0 as it's identity so if they click on the launch link, it should just download automatically without them having to remove 5. It does download something, you can see it downloading a package - not just opening the application directly as it does if there are no updates - but then when the application opens, it is still version 5, confirmed by checking size of files in documents and settings.

I personally can click on the same URL link and it downloads version 6 for me. I use control panel -> add remove programs to remove the previous version which they cant because of access control, but that is the only difference.

On their machines I can delete all files, all registry settings, then click on the same link which downloads version 6 for me, and somehow they still end up with version 5 being downloaded.

Any ideas? I'm going crazy here!

It sounds as if the client machines are detecting that there's a new publish package out there, but that the EXE itself is unchanged. To save time/bandwidth, ClickOnce will bring over assemblies from previous downloads in its cache on the local machine, for any assemblies whose identities haven't changed.

In other words, it sounds like you're updating the Publish version but not the Assembly version. To make the identity of the newer assembly different, be sure to update both the Assembly Version (under Project Properties > Application > Assembly Information...) as well as the Publish Version (under Project Properties > Publish).

You could throw in the File Version too (also under Project Properties > Application > Assembly Information...) for good measure, but that one never shows up in the application manifest.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM