doubts regarding dotNet reflection

F

forvino

Hi Geeks,


Ihave a doubt in dotNet reflection. I m developing a tool which will

returns set of public(access specifier) methods of the selected
assembly.


this works completely fine, when the selected components are
standalone assembly(only one assembly no reference made during
compilation)


But say for instance


I have two dlls
dbmaster.dll
UIMaster.dll
the second dll refers the first dll(ie dbmaster.dll).


Now when i m trying to load the dll via Assembly.LoadFrom method
it is throwing dependency not found. Is there any work around.
For me i just need methods of the UIMaster.


How can i achieve this. is there anything other than Reflection will
help solve this problem?
 
Y

Yunus Emre ALPÖZEN [MCSD.NET]

firstly u should load dependent assembly. in your example "dbmaster.dll"
must be in GAC.

Assembly.LoadFrom(..);//Load dbmaster.dll

And then load

Assembly.LoadFrom(..);//Load UIMaster

--
HTH

Thanks,
Yunus Emre ALPÖZEN
BSc, MCSD.NET
 
F

forvino

Hi Yunus,

Is it must that my dll should be in GAC. reflector.net does the
reverse enginneering even wen it is not loaded in GAC.

Even I am able get the method details if i dont have any references.
 

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

Similar Threads


Top