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?
I am using the following 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());
}
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".