Essentially need to read the dependencies programmatically without loading the assembly itself, as then you can\'t unload them
Use DnSpy (it won't load the dll in your program):
var assemblyDef = dnlib.DotNet.AssemblyDef.Load("myDllName.dll");
var manifest = assemblyDef.ManifestModule; // do whatever you want from here
ref: https://www.nuget.org/packages/dnSpyLibs
I did a blog post on that: https://medium.com/angular-and-dot-net/reading-assembly-info-without-loading-it-in-c-31a4bea7ef73