I’m looking the way to read all assemblies (.dlls) used by my app.
In a standard C# project there is “References” folder, when it is expanded I can read all libraries used.
My goal is programatically read all assemblies which are used by each project in my solution.
Finally I’d like to see what libraries are used by my compiled *.exe application.
Have you looked at
Assembly.GetReferencedAssemblies?Note that any references you don’t use won’t end up being emitted into the metadata, so you won’t see them at execution time.
I’ve used
GetReferencedAssembliesrecursively before now to find a named type without having to specify the assembly.