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 / .NET Framework / New Users / April 2007

Tip: Looking for answers? Try searching our database.

Add managed assemblies to GAC programmatically?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeff Johnson - 19 Apr 2007 16:59 GMT
Let's pretend I really really really don't like ClickOnce and I want to
implement my own updating process. Let's also say that I want the update
process to be able to add new assemblies to the GAC. Since gacutil.exe no
longer comes with the .NET framework by default, I can't simply shell out to
it, so I was wondering if there is a way to add assemblies to the GAC via
managed code.

Please note that I'm not talking about registering an assembly with COM or
COM+. I know there are things out there like the RegistrationServices class
and the System.EnterpriseServices namespace, but all the (admittedly few)
things I've read about them suggest that they're oriented towards COM/COM+.
Michael Nemtsev - 19 Apr 2007 17:03 GMT
Hello Jeff,

use GAC API, which is not documented http://support.microsoft.com/default.aspx?scid=kb;en-us;317540

---
WBR,  Michael  Nemtsev [.NET/C# MVP].  
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

JJ> Let's pretend I really really really don't like ClickOnce and I want
JJ> to implement my own updating process. Let's also say that I want the
JJ> update process to be able to add new assemblies to the GAC. Since
JJ> gacutil.exe no longer comes with the .NET framework by default, I
JJ> can't simply shell out to it, so I was wondering if there is a way
JJ> to add assemblies to the GAC via managed code.
JJ>
JJ> Please note that I'm not talking about registering an assembly with
JJ> COM or COM+. I know there are things out there like the
JJ> RegistrationServices class and the System.EnterpriseServices
JJ> namespace, but all the (admittedly few) things I've read about them
JJ> suggest that they're oriented towards COM/COM+.
JJ>
Jeff Johnson - 19 Apr 2007 18:46 GMT
> use GAC API, which is not documented
> http://support.microsoft.com/default.aspx?scid=kb;en-us;317540

Thanks. I hate to sound clueless, but this API is COM-based, yes? Would I
still be able to use it from a C# program? The sample code is C++.
Rory Becker - 19 Apr 2007 19:01 GMT
>> use GAC API, which is not documented
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;317540
>>
> Thanks. I hate to sound clueless, but this API is COM-based, yes?
> Would I still be able to use it from a C# program? The sample code is
> C++.

I'll be the first to admit I'd be a beginner in this area, but this link
looks like it might be of use
http://blogs.msdn.com/junfeng/articles/229649.aspx

--
Ror
Jeff Johnson - 19 Apr 2007 19:35 GMT
>> Thanks. I hate to sound clueless, but this API is COM-based, yes?
>> Would I still be able to use it from a C# program? The sample code is
[quoted text clipped - 3 lines]
> looks like it might be of use
> http://blogs.msdn.com/junfeng/articles/229649.aspx

Spectacular. Thanks.

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.