TypeLoadException

  • Thread starter Thread starter marko
  • Start date Start date
M

marko

I'm loading assembly with reflection as the following:

System.Reflection.Assembly assPlugin =
System.Reflection.Assembly.LoadFrom(sFile);

then: Type[] tpePluginTypes = assPlugin.GetTypes();

but this statement always Exception: System.TypeLoadException

thanks
msk
 
Just type 'Typeload' in the newsgroup
microsoft.public.pocketpc.developer
and look for date 17/1/2005 post by Greg.
Saurabh
 
The problem appears in the sFile assembly that you was trying to load.
For example one of classes in the sFile assembly is derived from
Assembly2.SomeClass but Assembly2 is absent. Then the Assembly.LoadFrom
will be executed normally but assPlugin.GetTypes() will throw exception
TypeLoadException because Assembly2 with a base class is missing.


Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top