Wednesday, January 30, 2008

CompositeUI Application Block: TypeLoadException GetExportedTypes in ModuleLoaderService

(Don't mind the title, I put all the necessary keywords to help others having the same problem to find this post :)).

Have you ever tried loading un-loadable assemblies with CAB? Like, the ones that have unresolvable references or something similar. You won't get a normal assembly binder (or whatever it's called) error... No, the exception you will get will be a TypeLoadException that is thrown by a call to GetExportedTypes() in the ModuleLoaderService. With a cryptic message saying that some type (probably the first one in the assembly) couldn't be loaded. if this happens, go back and check if your assemblies have valid references.

2 comments:

Anonymous said...

We have this very issue. Our project was incorrectly using version 9.0 of Microsoft Report Viewer.

Method 'get_ReportParameters' in type 'Credo.MyCredoSC.PerformanceReportingModule.ReportPerformanceViewer' from assembly 'PerformanceReportingModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

Julian said...

Thank you. I've just got same issue :) and I solved it with your help