Global Assembly Cache - Installation

M

Mythran

We don't use the Microsoft Windows Installer 2.0 for our setup packages.
Instead, we use InnoSetup which is much easier to use and learn and more
flexible (that I have found). The only part that is making me frustrated is
I can't seem to write an installer that will (a) install into the global
assembly cache and (b) throw an exception if the install failed.

We can't use GACUTIL to install into the gac because GACUTIL is not
redistributable. So I wrote a small app that installs into the GAC using
the System.EnterpriseServices.Internal.Publish class method GacInstall.
This works very well for (a). For (b) though, it doesn't. If for some
reason or another GacInstall fails to install the assembly, no exception is
raised, and there are no return values (since it's 'void'). So my app
returns success even though the actual assembly didn't get installed into
the GAC correctly.

Unless there is another way out there, I will need to perform all of the
checks / requirements myself in this gac installer executable prior to
calling GacInstall. Does anyone out there know of all of the checks and
requirements for a GacInstall to be successful? Here are a few I know of
currently:

1.) Assembly path must exists (umm, yeah, no brainer here).
2.) Assembly must be signed with a strong-name.

Thanks in advance :)

Mythran
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top