Can't debug Assembly.Load

  • Thread starter Thread starter Mike Hildner
  • Start date Start date
M

Mike Hildner

This returns true:

MsgBox(File.Exists("\Skids.dll"))



This gives me an IOException:

Dim myAssembly As [Assembly] = [Assembly].Load("\Skids.dll")



This is my first attempt at late binding. Seems like I'm mimicing code
examples I've seen. Searched to no avail (yet). Any pointers?



TIA,

Mike
 
Try Assembly.LoadFrom instead. Assembly.Load expect assembly string and not
a file path
 
Thanks, Alex. I thought I was missing something obvious, but couldn't figure
it out.

Funny being a newbie sometimes. Search MSDN and there's too much info to
figure out a basic problem. I was using the Load method because I copied it
from a C# MSDN Magazine example which obviously I don't fully understand.

Documentation for the Load method says it will throw an IOException if the
file can't be found. Hmmm...
Guess I need to read up.

Regards,
Mike


Alex Feinman said:
Try Assembly.LoadFrom instead. Assembly.Load expect assembly string and not
a file path

Mike Hildner said:
This returns true:

MsgBox(File.Exists("\Skids.dll"))



This gives me an IOException:

Dim myAssembly As [Assembly] = [Assembly].Load("\Skids.dll")



This is my first attempt at late binding. Seems like I'm mimicing code
examples I've seen. Searched to no avail (yet). Any pointers?



TIA,

Mike
 
Back
Top