PC Review


Reply
Thread Tools Rate Thread

assembleys having the same identities

 
 
Peted
Guest
Posts: n/a
 
      21st Feb 2007
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.

 
Reply With Quote
 
 
 
 
Laurent Bugnion [MVP]
Guest
Posts: n/a
 
      22nd Feb 2007
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
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Identities Kim Windows Vista Mail 3 29th Jan 2008 12:12 AM
identities Catherine E. Thompson Windows Vista Mail 5 15th Dec 2007 04:22 PM
Identities Debbie Microsoft Outlook 1 29th Oct 2003 05:46 PM
identities Microsoft Outlook Discussion 1 18th Oct 2003 09:38 PM
identities?? Rebecca Microsoft Outlook Discussion 2 14th Oct 2003 01:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:10 PM.