简体   繁体   中英

How to setup ClickOnce for multifile assemblies

My solution has 4 projects, each project contains many namespaces. Currently my DLL size is nearly 30 MB. Just a small change to a class means that the user needs to download a new version of the DLL which size is too large and it takes a long time.

How can a ClickOnce project be set up for multifile assemblies?

Have you considered splitting the DLLs into smaller more manageable ones? The same goal will be achieved and you will have better modularity as well as smaller DLLs for ClickOnce to monitor and download for users.

This should be a win-win for your application.

Another option is to create a patch for your deployment. You have to create MSP file instead of MSI.

Nice examples can be found, here:

http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/9ed4f13a-fea4-4a5c-b388-801cabdd339b

and here:

http://shreeman.spaces.live.com/blog/cns!E1AF7EB63FAA1FF!347.entry

I hope that this will help you.

  1. Right click the project and click Add->Existing Item menu to show the item adding dialog.
  2. Select the .netmodule files and click OK to add them to our project.
  3. Right click all the .netmodule files to show the properties dialog.
  4. Set Build Action property to Content and set Copy to Output Directory property to Copy always.
  5. Rebuild the project, the files would be copied to the main output directory.
  6. On the properties dialog of the project, select Publish tab.
  7. Click Application Files button to show the Application Files dialog.
  8. We would see the .netmodule files on the dialog. We can change the Hash to Include/Exclude to include/exclude a file in the publish files.

Reference: MSDN

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