cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sebastian_
Level 2

Installing assemblies to [GlobalAssemblyCache] AND [InstallDir]

Is there a way to install assemblies not only to the program folder (INSTALLDIR), but additionally also into the Global Assembly Cache? A trivial way to do this would be to add every file to two components and set the "Destination" property accordingly, but it seems that doing so would physically add the same file to the setup file twice, which leads to an increased size of the setup file. Is there any other way to achieve this?

A little background information: we are using two libraries, each of which consists of several dozen assemblies that add up to > 100 MB. We would like to install those assemblies to the GAC, but we know that some of our customers install our software to a net drive and access it from an arbitrary number of PCs (without running the setup there), so the assemblies also need to be placed in the installation directory.
Labels (1)
0 Kudos
(3) Replies
rrinblue22
Level 9

Did you look at the DuplicateFile table here
0 Kudos
sebastian_
Level 2

I tried using the DuplicateFile table, but it does not seem to be working. When I try copying it from GlobalAssemblyCache to INSTALLDIR, the file cannot be found. When I try it the other way around, the file won't be copied to the GAC.

I've found one or two articles that mention the same problem (e.g. this article: "Unfortunately, the DuplicateFile table does not support installing an assembly as both a global and a private assembly"). Seems like I would have to use a custom action or something like that...
0 Kudos
rrinblue22
Level 9

Apologies, I didn't know about the private vs global concept which is a limitation in using DuplicateFiles table.
Thanks for pointing at the article by Aaron Stebner.
0 Kudos