There can be multiple AppDomains with a win32 process. Each AppDomain can
make references to assemblies within that AppDomain. If an Assembly is
strong named, then the CLR can be sure that any calls to that assembly from
other AppDomains within that process will be requring the same assembly, so
it simply shares that assembly. If an assembly is not strong named, no such
guarantee exists, so I think(?) that each AppDomain gets its own copy.
This is a little different from standard Win32/unmanaged DLL's that are
global and shared between apps once loaded. Because of the public key (ie.
strong name) of a strong named assembly, the CLR can be assured that
requests on this assembly are definitely for this assembly. Non strong named
assemblies will be checked for a less strict set of criteria, and so an
assembly can be named the same with the same version number, but actually be
from different sources and do different things (therefore each AppDomain
will load its own local copy). Strongly named assemblies are uniquely
identified via the strong name.
I hope I haven't rambled too much and thats how I understand it. I would
welcome any clarificaiton though.
- Paul Glavich
[quoted text, click to view] "George" <GCeaser@aol.com> wrote in message
news:1e10c039.0403171356.649786d@posting.google.com...
> OK,
>
> I just had a long conversation with a co-worker on this and we
> are looking for the answers to the following question:
>
> Where do .Net Assemblies based on class libraries (DLLs) that are
> strong named execute and where do non-strong named assemblies execute.
>
> Logic tells me that since they are basically DLLs, they must load
> in their calling process' memory space and execute there.
>
> -----------------------I think this is where it gets
> fuzzy----------------
>
> However, I have seen reference to the CLR checking, when a GAC
> assembly is requested, to see if that assembly has already been
> previously loaded into the CLR and if it has, using the version that
> already loaded.
>
> Is this correct? If so, does this only happen for strong named
> DLLs assemblies or does it happen for all assemblies? Any help would
> be GREATLY appreciated.
>
> George