title: How to get the physical path of the referenced assemblies
body: <p>I have one main assembly, this assembly has referenced some more assembly. I am able to get those referenced assmbly names. But, i am unable to retrive the physical path of those referenced assemblies. Any one can help me on this?</p>
  
  <p>I am using the following code.</p>
  
  <pre><code>string path = Path.GetFullPath(txtFileName.Text);
  Assembly a = Assembly.LoadFrom(path);
  
      foreach (AssemblyName an in a.GetReferencedAssemblies())  {
      Assembly asm = Assembly.Load(an);                
      MessageBox.Show(an.FullName.ToString() + "Location : " + asm.CodeBase.ToString());
      }
  </code></pre>
  
  <p>It gives me the path of the system assembly "mscorlib". But when it try to retrive the user created assembly, it says "The system cannot find the file specified".</p>