I have an application with a database that I am running. I added all the dll’s, exe’s and db files I needed. These are content that are not going to be compiled. So I have set their Build Action as “Content” and their Copy to Output Directory as “Copy if newer”. With this, everytime I publish a newer version of the application, I change only one file slightly, yet still all the files are redownloaded. I have looked around here and apparently there is a hash associated with all the files. But they don’t seem to be giving me an answer of how I can publish a new version of an application, and have the end user only download the files that have changed?
Share
As you’ve noted, the files are hashed. When installing updates, ClickOnce checks the files on the server against the local version, and if they are the same, it doesn’t download them again, it copies them from the local directory.
I believe this only actually works for assemblies. If you look in your ClickOnce cache, you will find that each assembly in your deployment is copied into its own folder – this is kind of like a mini-cache that ClickOnce uses, and this is what it checks against when doing the comparison.
It might happen for other resources, but I wouldn’t bet on it. As noted by eoghank, you could use fiddler to verify that.