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
 

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

Similar Threads

Assembly.Load Troubles 1
Assembly.Load() exception 6
Assembly.Load from byte[] 2
Assembly.Load problems 2
newbie: Assembly.Load 4
File.Exists strangeness 6
CFReflector 4
Access Can't Get Dlookup To Work 1

Back
Top