2

OK, to start off, I have read both

How to prevent ReflectionTypeLoadException when calling Assembly.GetTypes()

and

http://haacked.com/archive/2012/07/23/get-all-types-in-an-assembly.aspx

but my problem is a bit more complicated.

My goal is simply to see if an assembly contains classes (or types) that implement a specific interface and what those classes (or types) are. If you read the info in the links, you will see a solution that provides a way to get to classes, but only as long as they can be loaded. If the ReflectionTypeLoadException exception is thrown, whatever types could not be fully loaded are still not available, so it doesn't do me any good.

My question is, how do I get to the information that says what types a specific type inherits from, regardless if I can actually load the type and regardless if I can load any of the types that it inherits from, even if it's just the FullName?

BTW, the assembly is located on a network path (not a mapped drive, a UNC path).

EDIT

I'd also like to point out that I tested the solutions in the links above, both with local paths and UNC paths and any types that cannot be loaded are returned as null in the collection of Types in the exception, regardless if the missing type was in the same location as the original assembly (referenced in the project and set to copy local).

Community
  • 1
  • 1
Hexum064
  • 349
  • 2
  • 14
  • Jon Skeet answered this here http://stackoverflow.com/questions/7889228/how-to-prevent-reflectiontypeloadexception-when-calling-assembly-gettypes – Zeph Nov 27 '13 at 19:50
  • Actually, he didn't. And I tested it. The collection of Types returned in the exception are all null. If I missed something, please elaborate. – Hexum064 Nov 27 '13 at 20:05

0 Answers0