Saving assembly version in ClickOnce?

We have a .Net application that uses ClickOnce to automatically update. But the problem with Click Once is that all assemblies receive updates regardless of any changes in the project or not. I think that manually updating only the modified dlls in the previous published ClickOnce folder and updating the manifest using MageUI.exe . I also think about the version of the increment of the modified assemblies so that we can track which assemblies have changed by looking at the user folder in which the ClickOnce application is installed. I would like to know that this approach is acceptable ? Thanks.

+7
clickonce mageui
source share
1 answer

I think this is not necessary. Although the update dialog provided by ClickOnce does not report this, ClickOnce will not download files if the following conditions are true:

  • The hash of the file is the same
  • The timestamp of the file is the same.
  • Assemblies may require their strong name.

Instead, it will copy files from the previous version.

So, if you use strong names and don't rebuild assemblies when they haven't changed, ClickOnce should do exactly what you want.

See here and here for reference.

Here is the official source saying

When updating the application, ClickOnce does not download all the files for the new version of the application if the files have not been changed. Instead, it compares the hash signatures of the files specified in the application manifest for the current application against the signatures in the manifest for the new version. If the file signatures are different, ClickOnce downloads the new version. If the signatures match, the file has not changed from one version to another. In this case, ClickOnce copies the existing file and uses it in the new version of the application. This approach prevents ClickOnce from downloading the entire application again, even if only one or two files have changed.

+4
source share

All Articles