register assembly and add it to GAC - Advanced Installer Community

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!

Asya
Posts: 3
Joined: Wed Apr 08, 2009 2:28 pm

register assembly and add it to GAC

Hi,
It is the first time I use advanced installer,

I create setup project using Advance installer trial version, I want to add an assemply to global assembly cached, but still be installed on the application directory. And then register that assembly.
In my development environment I do the following


"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil" /if mydll.dll
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regasm" mydll.dll

In mydll.dll I add installer class and override Install, uninstall and OnCommitted methods.
This assembly accesses other assembly which I add it to global assembly cache
I try to add custom action (Add predefined custom action - .Net Installer class custom action)
But when I build the project and run it I get error indicating that the dll not found, and that’s right because it is installed on the CAG.
And if I remove it from GAC it gives me error that can’t load one of it dependents.

My question how I can register assembly and add it to GAC

Thanks
Asya
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: register assembly and add it to GAC

Hi Asya,

Unfortunately the same assembly cannot be installed in both the GAC and a private location. However, you can try using two copies of the assemblies:
- one in a random folder which will be installed in the GAC (the folder is not important because it will not contain the assembly after install)
- the other in the installation folder of the assembly configured for a private location (this can be used by the custom action)

You can configure the assembly through the Assemblies page.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”