What is wrong with this code?

  • Thread starter Thread starter Boni
  • Start date Start date
B

Boni

The code

m_Asm= Assembly::Load("C:\\edit\\AAA\\AAA\\bin\\Debug\\AAA.dll");

throws the exception "File or assembly name or one of its dependencies is
not found", but the file and all dependencies are there. How can I debug
this?
 
Boni,
m_Asm= Assembly::Load("C:\\edit\\AAA\\AAA\\bin\\Debug\\AAA.dll");

throws the exception "File or assembly name or one of its dependencies is
not found", but the file and all dependencies are there. How can I debug
this?

Assembly::Load() takes as argument an assembly *name* not the path of the
assembly's DLL. You might be trying to use Assembly::LoadFrom(), instead, I
think.

You should definitly read this blog for the entries on the difference of
both techniques....
http://blogs.msdn.com/suzcook/default.aspx
 
Back
Top