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
Mattias Sjögren - 20 Aug 2006 20:59 GMT
Have you tried using the supported GAC APIs?
http://msdn2.microsoft.com/en-us/library/ms230575.aspx
Mattias

Signature
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.