Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / August 2006

Tip: Looking for answers? Try searching our database.

Global Assembly Cache - Installation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mythran - 18 Aug 2006 18:01 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.