Problem: Assume you have a machine on which some .NET assembly registers, loads, and/or runs correctly. This assembly may reference unmanaged DLLs via p/invoke, it may utilize COM objects, and it may actually be implemented in C++/CLI. How can you produce, in one automated step, a list of all the other DLLs (managed and unmanaged) that must be installed so that it will also register, load, and/or run on another machine?
Partial Solution #1: Red-gate's .net reflector can be used identify all the managed references.
Partial Solution #2: Red-gate's .net reflector has an "analyze" feature that will identify unmanaged DLLs utilized via p/invoke
Partial Solution #3: Depends can identify the unmanaged DLLs that are imported by an EXE or DLL. (And in its profiling mode, can also identify dynamic dependencies).
Open: How to run these tools (or others) in a batch mode, rather than manually clicking through all the dependency chains?
Bonus question: What about COM references -- is there any way to identify required COM objects and then also trace their dependencies?
Related Questions: I see that this question covers similar ground. (But it does not specify that unmanaged dependencies also be found, and the accepted answer is .net reflector which only provides part of what I'm looking for.) Similar for this one.