J
Jozsef Bekes
Hi All,
I am trying to use reflection for getting all the classes from the dlls of a
software written by my company. I am using this line:
Assembly.LoadFile(s).GetTypes()
Gettypes fails, I guess because when one dll refers to another one of mine,
Reflection does not find that dll. This is what the exception contains
anyway. So I realized that I'd need to copy the dlls, or register them to
the GAC. And then I tried Reflector, and to my amazement, everything was
working fine! Then I tried some tricks, invoked Assembly.LoadFile() for all
the referenced dlls before trying GetTypes() on the one in question, still
no success. Does anyone have an idea how it can be done without copying and
GAC?
I appreciate all your answers.
Thanks,
Jozsi
I am trying to use reflection for getting all the classes from the dlls of a
software written by my company. I am using this line:
Assembly.LoadFile(s).GetTypes()
Gettypes fails, I guess because when one dll refers to another one of mine,
Reflection does not find that dll. This is what the exception contains
anyway. So I realized that I'd need to copy the dlls, or register them to
the GAC. And then I tried Reflector, and to my amazement, everything was
working fine! Then I tried some tricks, invoked Assembly.LoadFile() for all
the referenced dlls before trying GetTypes() on the one in question, still
no success. Does anyone have an idea how it can be done without copying and
GAC?
I appreciate all your answers.
Thanks,
Jozsi