ClickOnce reference updates

I've spent some time becoming familiar with ClickOnce and think I understand how it works for forms applications.

My primary question regards a reusable library that many apps consume.  If this library is versioned, a consuming ClickOnce deployed app does not appear as requiring an update.  What is needed to make that happen   If an update is published to the app, will new references be deployed

If I understand correctly, there is no way to use ClickOnce for the class library by itself, correct   Could the API be used manually to accomplish this, or is the manifests, etc limited only to forms applications

Gary

 



Answer this question

ClickOnce reference updates

  • SmokeNMirrors

    The quick answer is that ClickOnce determines if the file hash, as entered in the manifest, has changed, and downloads the new file if it has.  So, you need to make sure you are republishing your application in order for the referenced assemblies to be updated.

    That's a good thing.  The basic philosophy behind shared libraries in managed (.NET based) apps today is that you should keep your dependencies isolated with your applications, and not install the centrally. This avoids problems that we would run into in the COM world where an updated COM .dll would cause an application to break because even though the interface was the same/compatible, the implementation changed, and the application depended on the older behavior. As a result, each application should be tested when a referenced library is updated, to assure the application is still working correctly. If it is, then redeploy the application, and all is good. In other words, the application determines which version of the library it uses.

    There are some advanced ways to do update app.config files and change which version of an assembly is used, so you can force an app to go back to an older (or newer) version without recompiling.

    Also, as you surmised, there is no facility for ClickOnce deploying "shared" libraries, mostly due to the explanation above :-)

     



  • ClickOnce reference updates