Assembly loading

  • Thread starter Kjetil Kristoffer Solberg
  • Start date
K

Kjetil Kristoffer Solberg

I have a question regarding assembly loading.Basically I am asking whether
or not the
assembly loader can load multiple versions of the same assembly if:

1. The assemblies are strongly named and lies in the GAC

2. The assemblies are strongly named and lies outside the GAC

3. The assemblies are not signed and loaded using the Load method with a
partial qualified reference(incomplete four-part name).

4. The assemblies are not signed and loaded using the Load method with a
fully qualified reference(complete four-part name).

If it can load multiple versions of the same assembly how does the CLR
differ between types in one version of the assembly
and types in another version? Also this question applies to both statically
bound assemblies as dynamically bound assemblies.

regards
Kjetil Kristoffer Solberg
 
M

Mattias Sjögren

1. The assemblies are strongly named and lies in the GAC

2. The assemblies are strongly named and lies outside the GAC

3. The assemblies are not signed and loaded using the Load method with a
partial qualified reference(incomplete four-part name).

4. The assemblies are not signed and loaded using the Load method with a
fully qualified reference(complete four-part name).

I believe the answer is yes for 1 and 2, and no for 3 and 4. But I
suggest you test it yourself to verify.

If it can load multiple versions of the same assembly how does the CLR
differ between types in one version of the assembly
and types in another version?

Type identity is scoped by the full assembly name. So type Foo in
assembly Bar v1.0 is different from Foo in Bar v2.0.



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top