URGENT : GetTypes in assembly??

  • Thread starter Thread starter aerge calderara
  • Start date Start date
A

aerge calderara

dear all,

I am using the GetTypes method of an assembly object in
order to check that it implement a particular needed
interface for my application.

system.Reflexion.Assembly.LoadFrom(sFile).GetTypes was
working fine until today where I get an error saying that
all type in assembly cannot be loaded.

Without changing anything I get this error any idea why
and how can I avoid it?

Thnaks for your information
regards
serge
 
aerge calderara said:
I am using the GetTypes method of an assembly object in
order to check that it implement a particular needed
interface for my application.

system.Reflexion.Assembly.LoadFrom(sFile).GetTypes was
working fine until today where I get an error saying that
all type in assembly cannot be loaded.

Without changing anything I get this error any idea why
and how can I avoid it?

Is there any InnerException in the exception thrown by GetTypes()?
 
I had a similar problem. In my case i had multiple dlls in the same
folder as dependancies. These were referenced and used in the dll i was
reflecting. I did an Assembly.LoadFrom for each of these files then it
worked. Would have been nice if Assembly.LoadFrom would load the main
dll and all its dependancies but i could not figure out how to make it
do that.

Hope this helps
Leon Lambert
 
Back
Top