Add managed assemblies to GAC programmatically?

  • Thread starter Thread starter Jeff Johnson
  • Start date Start date
J

Jeff Johnson

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+.
 
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>
 
Back
Top