I'm writing a console app that loads the dlls from another directory
(say in the debug directory of a different class library), and iterates
through all the methods in all the .exes and .dlls using the
GetMethodInfo function.
This works just fine, except when one function in the dll makes a call
to a function in another dll file. In these cases, calling GetTypes on
the module returns a FileNotFoundException on the second dll file (even
thought its clearly in the same directory).
If I move the dlls from the other folder to application folder, the
exception doesn't occur. At first I thought this was a permissions
issue, so I tried setting Envirnoment.CurrentDirectory to the directory
of the dlls. I also tried demanding ReflectionPermissions, but that
didn't work either.
Does anyone know what I might be doing wrong?