Here is some quick code to show case the Cecil Library to do this:
public static void PoC(IEnumerable<AssemblyDefinition> assemblies, TextWriter writer)
{
Console.WriteLine("digraph Dependencies {");
var loaded = assemblies
.SelectMany(a => a.Modules.Cast<ModuleDefinition>())
.SelectMany(m => m.AssemblyReferences.Cast<AssemblyNameReference>().Select(a => a.Name + ".dll"))
.Distinct()
.Select(dllname => {
try { return AssemblyFactory.GetAssembly(dllname); }
catch { return null; } })
.Where(assembly => assembly != null)
.ToList();
loaded.ForEach(a => a.MainModule.FullLoad());
loaded.ForEach(a =>
{
foreach (var r in a.MainModule.AssemblyReferences.Cast<AssemblyNameReference>())
Console.WriteLine(@"""{0}"" -> ""{1}"";", r.Name, a.Name.Name);
} );
Console.WriteLine("}");
}
It generates a dot
graph file. Running this on a fairly simple project results in:

Running it on a slightly less simple project returned this:

It may be advisable to filter out certain assemblies (.StartsWith("System.")
?) and / or limit search depth etc.