c# - Using Reflection when an assembly contains types referencing another assembly -


i getting reflectiontypeloadexception following code :

var myassembly = assembly.loadfrom(mydll);     var types = myassembly.gettypes()) 

mydll references class in file in other assembly ("mydependency.dll")
made sure file resides in application directory , in same folder "mydll" file.

how able load mydll in case ?

i'd try calling:

assemblyname[] referenced = myassembly.getreferencedassemblies(); 

then iterate on assemblyname objects , attempt load those, prior calling myassembly.gettypes()


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -