Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

DLL is missing from GAC under special circumstances

Dear Advanced Installer Support,

Please let me share an interesting finding with you, the following steps will help you in better understanding:
1. Add a DLL to "Files and Folders/Application Folder"
2. Go to Assemblies tab -> right click -> Add Assembly -> add your previous dll. Use "Install in Global Assembly Cache".
3. Go to Organization tab and move you new component under the proper feature. Let's assume you'd like 2 of your features (A and B) to put the DLL to GAC, it means the new component should be added to both features. If one of those features (A or B) is installed, we'd expect the DLL to appear in GAC. Unfortunately this is not working as expected.
4. Let's move the component below A. At this point I see the following line in our .aip file:
<ROW Component_="<name of our dll>.dll" Feature_="A" Attributes="0"/>
As you can see the component's parent feature will be A. Drag and drop the component by using the SHIFT button (creating a duplicate) from A to B as well. You see the same component (the DLL) under both features.
5. Perform some tests:
Install Feature A -> DLL is installed to GAC
Install Feature A and B -> DLL is installed to GAC -> now remove Feature A -> DLL is MISSING from GAC
Install Feature B only -> DLL is MISSING from GAC
From the tests you can see that the component is fully dependent upon Feature A, although Feature B also requires its existence in the GAC.

Could you please help us to achieve the following: a DLL is installed to GAC if either Feature A or Feature B is installed.

Thanks in advance,
Zsolt
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: DLL is missing from GAC under special circumstances

Hi Zsolt,

I tested the scenario you described, but I couldn't reproduce the behavior. The results I got were as follows:
  • Install Feature A -> DLL is installed to GAC
    Install Feature A and B -> DLL is installed to GAC -> now remove Feature A -> DLL remains in GAC
    Install Feature B only -> DLL is installed to GAC
Can you reproduce the behavior on multiple clean machines? If so, can you please send me a sample project that reproduces the problem, so I can build and test it?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”