0

I am writing a supplemental program for the software that came with a programmable robot. The DLL structure has about 6 DLLs that I can reference, with another set that I need to load at runtime.

The ones I need to load at runtime have a class inside them that I need to create an instance of just to read some properties. The class is name 'cGame' but when I try:

Assembly asm = Assembly.LoadFile(path);
Type t = asm.GetType("cGame");

t is null. I think the problem is that 'cGame' is derived from a class called 'cGame' in a different namespace. When I try:

Assembly asm = Assembly.LoadFile(path);
Type[] t = asm.GetTypes();

it throws an exception about not being able to load the file or assembly. The assembly it throws the error on is one that I have referenced in the project.

Does anyone have any ideas that might be helpful?

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by toadzky
0

any ideas for getting the namespace? the namespace changes with each dll and I need to iterate thru the dlls I can't reference.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.