Hi,
Peted wrote:
> 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/Lo...Isolation.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
> 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.
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog:
http://www.galasoft-LB.ch
PhotoAlbum:
http://www.galasoft-LB.ch/pictures
Support children in Calcutta:
http://www.calcutta-espoir.ch