Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update just one DLL in a ClickOnce installation?

Tags:

clickonce

I am working on a large click-once application (150MB, >200 DLLs) and as part of the interative debugging process I would like to update just 1 DLL and relaunch the application without having to rebuild and redeploy the entire application.

Is that possible? If so... how?

Question Clarification: 9/26/2009

I know that it is possible to manually patch DLLs on the client after it has downloaded the entire application and then launch the client .EXE directly from the local cache folder. That's not the point. I want to know how to change/add a DLL on the server and have all clients get the new DLL the next time they launch. I am looking for a "copy the DLL to this folder and edit this text file" kind of answer if possible. I specifically do NOT want to have rebuild or redeploy the click-once install on the server... just patch it by hand with a single DLL that I compiled in the IDE.

like image 852
Simon Gillbee Avatar asked Oct 15 '09 20:10

Simon Gillbee


1 Answers

I have been fighting with this for a couple of days, it can be done but it's fiddly, With this solution ClickOnce still scans all files and shows the progress bar but only downloads and updates the changes.

Here is the process I have written to apply this patching method...

Note this process need to be carried on with an exact copy of the Click once deployment to be upgraded.

In the Application Files folder…

  1. open .exe.manifest using mageui (version 3.5 or greater assuming VS2010)
  2. Change the version number

  3. Replace the patched file(s) Note: files are renamed with the filename .deploy E.g. Control.DLL becomes control.DLL.Deploy

  4. Sign & Save the File with you PFX file

In the Root Path

  1. Open .application file using mageui (version 3.5 or greater)
  2. Change the version number
  3. Change the minimum required version number
  4. Select the exe.manifest modified above
  5. Sign & Save the File

Copy .application to Application Files folder* Note: This step is not strictly necessary, but just keeps the backup files relevant.

Manifest files and patched libraries can now be copied to your deployment environment.

like image 193
Ben Avatar answered Sep 28 '22 07:09

Ben