I have one main assembly, this assembly refers to another assembly. I can get these reference names. But I cannot restore the physical path of these referenced assemblers. Can anyone help me with 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()); }
This gives me the build path of the mscorlib system. But when he tries to retrieve the custom assembly, he says: "The system cannot find the specified file."
source share