title: How to find dependency assembly path in c# .Net
body: <p>I am trying to get the dependency assemblies name, the location from where the dependent DLL is loading and the dependency of the dependent DLL's.</p>
  
  <p>I am getting the path of the ".exe" file as an input.</p>
  
  <p>To find the dependencies I am using the following code.</p>
  
  <pre><code>var assemblies = Assembly.LoadFile("C:\\My Folder\\ MyApp.exe").GetReferencedAssemblies();
  </code></pre>
  
  <p>The <strong>"assemblies"</strong> is a collection of <strong><code>System.Reflection.AssemblyName</code></strong> class objects.</p>
  
  <p>I am using the for-each to get the list of assembly names to find the dependency list.</p>
  
  <ol>
  <li><p>How to get the <strong>location of each dependency assembly</strong>? </p></li>
  <li><p>How to get the <strong>dependency of dependent assemblies</strong>? For example, if am using myAppBase.dll in the MyApp application, How can I get the dependencies of myAppBase.dll.</p></li>
  </ol>