As @CRice said you can use the below method to get a list of dependent assembly with publicKeyToken
public static int DependencyInfo(string args)
{
Console.WriteLine(Assembly.LoadFile(args).FullName);
Console.WriteLine(Assembly.LoadFile(args).GetCustomAttributes(typeof(System.Runtime.Versioning.TargetFrameworkAttribute), false).SingleOrDefault());
try {
var assemblies = Assembly.LoadFile(args).GetReferencedAssemblies();
if (assemblies.GetLength(0) > 0)
{
foreach (var assembly in assemblies)
{
Console.WriteLine(" - " + assembly.FullName + ", ProcessorArchitecture=" + assembly.ProcessorArchitecture);
}
return 0;
}
}
catch(Exception e) {
Console.WriteLine("An exception occurred: {0}", e.Message);
return 1;
}
finally{}
return 1;
}
i generally use it as a LinqPad script you can call it as
DependencyInfo("@c:\MyAssembly.dll");
from the code