Assembly.LoadFile question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

Would anyone know Assembly.LoadFile(file) method prevents loading the same
assembly multiple times even if it's called over and over again with the same
file? If it does not, what's the better way to make sure only one copy of the
same assembly is loaded (the first time called)?

Thanks.
 
There are some subtle differences between LoadFrom and LoadFile. This blog
talks about a lot of these issues.

http://weblogs.asp.net/suzcook

LoadFrom can be redirected, LoadFile will always load exactly that file. I
think both forms will usually load the same assembly once (LoadByte will
load it over and over again). However, LoadFile does not have a fusion
context so any dependencies it has will not be automatically resolved.

Without knowing more about what you really want to accomplish it's not
possible to determine which method is most suitable.
 

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

Back
Top