If I run this code:
var myAsm = typeof(MyType).Assembly;
var types = myAsm.GetExportedTypes();
I get:
System.IO.FileNotFoundException : Could not load file or assembly ....
which lists a dependent assembly. However, if I do:
var myAsm = Assembly.LoadFrom(...); // DLL containing the same assembly as above
var types = myAsm.GetExportedTypes();
it works fine.
I really would prefer the first technique, as it's cleaner... why should I have to load a DLL that is already loaded? Any advice?