-1

Possible Duplicate:
How to reproducably cause / provoke a ReflectionTypeLoadException?

I wanted to get all types in a loaded assembly.code snippet is as follows

Assembly assemblyObj = Assembly.LoadFile(@"D:\abc\abc.dll");
            IList<Type> types = assemblyObj.GetTypes();

when i run im getting ReflectionTypeLoadException.What is the mistake in the code.

Community
  • 1
  • 1
Geeta
  • 69
  • 1
  • 8

1 Answers1

0

As you can see in my answer to the question linked as duplicate, the problem most likely is, that "abc.dll" contains a class that derives from a class in a referenced assembly and that referenced assembly doesn't contain that base class, because it has the wrong version.

Daniel Hilgarth
  • 171,043
  • 40
  • 335
  • 443