1

I am getting a System.TypeLoadException whenever I call the assembly.GetExportedTypes() method on a dynmically loaded assembly. I have done my homework and looked all over the fusion logs with nothing meanigful what so ever. I even opened the target assembly/DLL file and found the GetX() method implementation so I am not sure what is happening exactly. And it is not cached in the GAC or loading an older version as am using the probing app config element.

Any ideas what is going on?

code-ninja
  • 1,586
  • 1
  • 15
  • 23
  • 2
    To make sure, that you are really loading the right assembly, and that all other referenced assemblies are loaded properly, please subscribe to AppDomain.ResolveAssembly event: http://msdn.microsoft.com/en-us/library/system.appdomain.assemblyresolve.aspx – Marek Kembrowski Oct 31 '12 at 20:27
  • I think this is a different issue, as resolving errors are different from TypeLoadExceptions – code-ninja Oct 31 '12 at 22:40
  • its likely very similar to this: http://stackoverflow.com/questions/948785/typeloadexception-says-no-implementation-but-it-is-implemented – user1416420 Nov 01 '12 at 06:48

1 Answers1

1

The issue turns out to be loading the same assembly into more than one app domain which was causing all sorts of run time errors, more information here

code-ninja
  • 1,586
  • 1
  • 15
  • 23