Re: Is the GAC dynamic?

From: Carlos J. Quintero [.NET MVP] (carlosq_at_NOSPAMsogecable.com)
Date: 03/02/05


Date: Wed, 2 Mar 2005 10:42:28 +0100


"julien" <julien@sobrier.net> escribió en el mensaje
news:4225431d$0$29693$626a14ce@news.free.fr...
> Hello,
> I have one 2 more questions about the GAC:
> 1/If I had a dll to be shared in the GAC directory, will it be loaded when
> a program will try to find it?

When an app needs a DLL, the .NET framework run-time will load it wherever
is found.

> Or do I have to load it manually using the command line tool?

Huh? What command-line tool? The gacutil.exe command-line tool only puts
DLLs in the GAC. Once there, apps can use them.

> 2/If I change the config file to change the version mapping, will it be
> automatically reflected by the GAC, or do I have to manually unload all
> libraries and load them back?

If you change the config file, changes will be taking into account the next
time that you run the app. There is no reflection or change in the GAC: the
GAC will have 2 versions of the DLL and your config file sets what version
to use.

So, no the GAC is not dynamic. The GAC is a kind of static repository for
versioned DLLs, and apps, when run, decide which version to use.

-- 
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com


Relevant Pages

  • Re: To GAC or not to GAC, that is the question
    ... Well, theoretically, if you updated your DLL, you would want it to available ... >> Since you will have multiple applications using the same DLL, the GAC ... Having multiple copiues of a DLL ... Would you want to run the risk of an update of App A causing ...
    (microsoft.public.dotnet.general)
  • CLR was running a version of my dll that didnt exist!?!?
    ... OK, we have a .NET dll hosted in COM+ running as a queued, pooled ... component - I say this as an explanation of why my assemlies are in the GAC ... (the only way to run a COM+ server app). ... and the com+ app is gone) we then install foo.dll version 1.0.1 into the ...
    (microsoft.public.dotnet.framework.clr)
  • Re: How can I use a dll with several programs?
    ... with the GAC is the possibility of a new version of a .dll unintentionally ... Maintaining backwards compatibility of a .dll by keeping ... largely removed DLL Hell from the Windows programming radar. ... 50% based on incorrect registry entries and since .NET assemblies don't ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Public Key Specification When Referencing A Strong Named DLL
    ... up posting might be of benefit to some that are new to using the GAC ... DLL file into the proper GAC folder. ... reference the public key created using the sn.exe utility. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How can I use a dll with several programs?
    ... with the GAC is the possibility of a new version of a .dll unintentionally ... Maintaining backwards compatibility of a .dll by keeping its ... largely removed DLL Hell from the Windows programming radar. ... 50% based on incorrect registry entries and since .NET assemblies don't ...
    (microsoft.public.dotnet.languages.vb)