We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

alexander.knorr
Posts: 5
Joined: Mon Dec 02, 2013 10:14 am

Conditional GAC Install

Hi there,

is it in any non-obvious way possible to GAC-Install assemblies depending on a conditional flag? The Assemblies
page doesn´t offer conditionals. Currently we have to maintain two separate setups, one with GAC install some
of the installed assemblies and another without (just leaving that special assemblies in APPDIR).

kind regards,
Alex
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Conditional GAC Install

Hi Alex,

You can condition the GAC installation from the Component property to which it belongs in the Organization page.

First of all you should duplicate these files(you can also create a new folder to add them), and the one which you add in the Assemblies page you should condition their registration through their component. For an easier navigation between views (Files and Folders page and Organization page) you can use the F8 keyboard key - Go to component or its toolbar button Go to Component.

Please let us know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
alexander.knorr
Posts: 5
Joined: Mon Dec 02, 2013 10:14 am

Re: Conditional GAC Install

Hi Dan,

thank you much, i was focused on switching between GAC and normal install, but doubling the files into it´s own components makes absolute sense :-)

now i have another problem with GAC installed assemblies. May be you can assist here, it´s a little bit complicated:

Following situation, we have two versions of the installatio:

V1: Assemblies are installed in GAC using "Generate when Computer is idle" option.
V2: Assemblies are installed in GAC using ""Wait for this native image generation to continue". option.
Both versions have same Upgrade-Code and use "Uninstall old version first and then install new version".
Beside the GAC assemblies there are other resources, but we can keep them out, because they work, and just focus on the GAC.
Also during the installation no program is open, which references the GAC assemblies (i guard this with a "Detect Process" custom action).

V1 Version is currently out on clients. When V2 is installed over V1 i would expect that the assemblies are in GAC, but this is not the case. Also some
clients are forced to a hard reboot when a program tries to use the referenced assemblies in the GAC (which are not there at this time).
Even open documents (Word, Excel) are not asked to be saved in the hard reboot.

When V2 is installed without V1 existing on the system, the assemblies are there immediately and no reboot is forced, all fine.

Two questions pop up:

1. Why are the GAC assemblies not in-place when V2 is installed over V1?
2. What is going on in the system when a program tries to use the non-existing assemblies in GAC, that a hard reboot is forced, which disrupts users immediately from there work?

i thing that something here is related to how "ngen" works, but may be you can give a starter, or may be give some advice how AdvancedInstaller would use "ngen" internally to accomplish
it´s task in the V1 -> V2 sequence, that i can do some research in the underpinnings. I was hoping to avoid touching "ngen" in installer environments, but maybe i have no chance :-)

any idea?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Conditional GAC Install

Hello,

It may be related with the native images of the old assemblies not being already generated during the upgrade operation. Would you please send us to support at advancedinstaller dot com the related assemblies so we can make further investigation? As far as the reboot problems it may be a .Net issue.

The way how Advanced Installer performs the native images is by using the "ngen install" with the coresponding priority (e.g. Level 3 generate when the computer is iddle).
On the uninstall process we are using the "ngen uninstall". You can also take a look on the Ngen.exe article which may be useful to you.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”