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.
I am getting the path of the ".exe" file as an input.
To find the dependencies I am using the following code.
var assemblies = Assembly.LoadFile("C:\\My Folder\\ MyApp.exe").GetReferencedAssemblies();
The "assemblies" is a collection of System.Reflection.AssemblyName class objects.
I am using the for-each to get the list of assembly names to find the dependency list.
How to get the location of each dependency assembly?
How to get the dependency of dependent assemblies? For example, if am using myAppBase.dll in the MyApp application, How can I get the dependencies of myAppBase.dll.