2

I have an application which takes an argument as the path of some assembly(exe/dll). I need to recursively load all referenced assemblies. I tried to use assembly.GetReferencedAssemblies() method, but it gives only assembly names, not physical paths(Assembly.LoadFrom(path)) (by using assembly name assembly.Load() method doesn't find assembly to load).

How can I proceed this using C# ?

Jester
  • 56,577
  • 4
  • 81
  • 125
Alexander
  • 169
  • 1
  • 1
  • 9
  • in the mentioned solution it's supposed to get just the assembly 1 level path of the appropriate code. In my case I want to get all referenced assembly paths recursively (like assembly paths of assemblies that are used in codes, etc..). – Alexander Oct 14 '14 at 10:48
  • 1
    This sounds like an [XY problem](http://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&sqi=2&ved=0CCEQFjAA&url=http%3A%2F%2Fmeta.stackexchange.com%2Fquestions%2F66377%2Fwhat-is-the-xy-problem&ei=kRg9VNbeC43UaueMgrgI&usg=AFQjCNG6PdyCWEgR_NXZkL96ZR4G9aJ-wA&sig2=rpAwcuVJ1xJR38MhA76gqQ&bvm=bv.77161500,d.d2s): why do you need to do this? – Richard Oct 14 '14 at 12:35
  • 3
    @Richard This sounds like you don't know the answer. Many reasons why I need to do this, but if you're not set to discuss that and just searching for some "clever" tricks to avoid the answering, then I'm not going to share that with you. Thanks. – Alexander Oct 14 '14 at 20:24

0 Answers0