assembleys having the same identities

P

Peted

Bellow is a snippet from the ms website about using loadfile on
assemblies that have the same identities.

I beleive this "identity" issue may be the cause of a problem i have
using the alternative Loadfrom option to load the assembly.

Cany anyone explain to me what this "identity" issue is, how it
relates to creating multiple DLL's in c#, and how does it differ in
the use of loadfile and loadfrom


any advice appreciated

thanks

Peted

Quote:
Use the LoadFile method to load and examine assemblies that have the
same identity, but are located in different paths. LoadFile does not
load files into the LoadFrom context, and does not resolve
dependencies using the load path, as the LoadFrom method does.
LoadFile is useful in this limited scenario because LoadFrom cannot be
used to load assemblies that have the same identities but different
paths; it will load only the first such assembly.
 
L

Laurent Bugnion [MVP]

Hi,
Bellow is a snippet from the ms website about using loadfile on
assemblies that have the same identities.

I beleive this "identity" issue may be the cause of a problem i have
using the alternative Loadfrom option to load the assembly.

Cany anyone explain to me what this "identity" issue is, how it
relates to creating multiple DLL's in c#, and how does it differ in
the use of loadfile and loadfrom

See this article, it's very good:

http://www.gotdotnet.com/team/clr/LoadFromIsolation.aspx

The snippet hereunder states that LoadFile doesn't have that problem, so
you probably should use LoadFile instead of LoadFrom when possible.
However, there are cases where LoadFrom must be used, for example if the
assembly you want to load is located on a different server (in the case
of a web application for example).

HTH,
Laurent
 

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