<p>I can get easily see what projects and dlls a single project references from within a Visual Studio .NET project.</p>

<p>Is there any application or use of reflection that can build me a full dependency tree that I can use to plot a graphical chart of dependencies?</p>

[{'answer_id': 80303, 'author': 'Gulzar Nazim', 'author_id': 4337, 'author_profile': 'https://Stackoverflow.com/users/4337', 'pm_score': 3, 'selected': True, 'text': '<p>In addition to NDepend, you can also try this addin for <a href="http://www.codeplex.com/reflectoraddins/Wiki/View.aspx?title=Graph&amp;referringTitle=Home" rel="nofollow noreferrer">Reflector</a> for showing assembly dependency graph.</p>\n'}, {'answer_id': 308289, 'author': 'Patrick from NDepend team', 'author_id': 27194, 'author_profile': 'https://Stackoverflow.com/users/27194', 'pm_score': 3, 'selected': False, 'text': '<p>NDepend comes with an interactive dependency graph coupled with a dependency matrix. You can <a href="http://www.ndepend.com/NDependDownload.aspx" rel="noreferrer">download and use the free trial edition</a> of NDepend for a while.</p>\n\n<p><a href="http://www.ndepend.com/Doc_VS_Arch.aspx" rel="noreferrer">More on NDepend Dependency Graph</a>\n<img src="https://i.stack.imgur.com/D3cYI.png" alt="enter image description here"></p>\n\n<p><a href="http://www.ndepend.com/Doc_Matrix.aspx" rel="noreferrer">More on NDepend Dependency Matrix</a>:\n<img src="https://i.stack.imgur.com/zVHhe.png" alt="enter image description here"></p>\n\n<p><em>Disclaimer: I am part of the tool team</em></p>\n'}, {'answer_id': 2293365, 'author': 'Esther Fan - MSFT', 'author_id': 275715, 'author_profile': 'https://Stackoverflow.com/users/275715', 'pm_score': 2, 'selected': False, 'text': '<p>You can create a dependency graph of projects and assemblies in Visual Studio 2010 Ultimate by using Architecture Explorer to browse your solution, select projects and the relationships that you want to visualize, and then create a dependency graph from your selection.</p>\n\n<p>For more info, see the following topics:</p>\n\n<p><strong>How to: Generate Graph Documents from Code</strong>: <a href="http://msdn.microsoft.com/en-us/library/dd409453%28VS.100%29.aspx#SeeSpecificSource" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/dd409453%28VS.100%29.aspx#SeeSpecificSource</a></p>\n\n<p><strong>How to: Find Code Using Architecture Explorer</strong>: <a href="http://msdn.microsoft.com/en-us/library/dd409431%28VS.100%29.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/dd409431%28VS.100%29.aspx</a></p>\n\n<p><strong>RC download</strong>: <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=457bab91-5eb2-4b36-b0f4-d6f34683c62a" rel="nofollow noreferrer">http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=457bab91-5eb2-4b36-b0f4-d6f34683c62a</a>.</p>\n\n<p><strong>Visual Studio 2010 Architectural Discovery &amp; Modeling Tools</strong> forum: <a href="http://social.msdn.microsoft.com/Forums/en-US/vsarch/threads" rel="nofollow noreferrer">http://social.msdn.microsoft.com/Forums/en-US/vsarch/threads</a></p>\n'}, {'answer_id': 2295631, 'author': 'Chris Chedgey - Structure101', 'author_id': 181065, 'author_profile': 'https://Stackoverflow.com/users/181065', 'pm_score': 0, 'selected': False, 'text': '<p><a href="http://www.headwaysoftware.com/products/structure101/index.php" rel="nofollow noreferrer">Structure101</a> can do that. You can browse a model by assembly and/or namespace, and clicking on any dependency at any level give you all the code-level references that cause the dependency. The .NET version is in beta, but it\'s been available for other languages for years, so it\'s very mature. Here\'s an example screen shot. \n<a href="http://www.headwaysoftware.com/images/assemblies.jpg" rel="nofollow noreferrer">alt text http://www.headwaysoftware.com/images/assemblies.jpg</a></p>\n'}, {'answer_id': 10472374, 'author': 'Danny Tuppeny', 'author_id': 25124, 'author_profile': 'https://Stackoverflow.com/users/25124', 'pm_score': 3, 'selected': False, 'text': '<p>I needed something similar, but didn\'t want to pay for (or install) a tool to do it. I <a href="https://blog.dantup.com/2012/05/free-dependency-graph-generation-using-powershell-and-yuml/" rel="nofollow noreferrer">created a quick PowerShell script that goes through the project references</a> and spits them out in a <a href="https://yuml.me/" rel="nofollow noreferrer">yuml.me</a> friendly-format instead:</p>\n<pre><code>Function Get-ProjectReferences ($rootFolder)\n{\n    $projectFiles = Get-ChildItem $rootFolder -Filter *.csproj -Recurse\n    $ns = @{ defaultNamespace = &quot;http://schemas.microsoft.com/developer/msbuild/2003&quot; }\n\n    $projectFiles | ForEach-Object {\n        $projectFile = $_ | Select-Object -ExpandProperty FullName\n        $projectName = $_ | Select-Object -ExpandProperty BaseName\n        $projectXml = [xml](Get-Content $projectFile)\n        \n        $projectReferences = $projectXml | Select-Xml \'//defaultNamespace:ProjectReference/defaultNamespace:Name\' -Namespace $ns | Select-Object -ExpandProperty Node | Select-Object -ExpandProperty &quot;#text&quot;\n        \n        $projectReferences | ForEach-Object {\n            &quot;[&quot; + $projectName + &quot;] -&gt; [&quot; + $_ + &quot;]&quot;\n        }\n    }\n}\n\nGet-ProjectReferences &quot;C:\\Users\\DanTup\\Documents\\MyProject&quot; | Out-File &quot;C:\\Users\\DanTup\\Documents\\MyProject\\References.txt&quot;\n</code></pre>\n<p><a href="https://i.stack.imgur.com/PH5br.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PH5br.png" alt="Sample Graph" /></a><br />\n<sub>(source: <a href="https://yuml.me/4f30e632" rel="nofollow noreferrer">yuml.me</a>)</sub></p>\n'}]
['https://Stackoverflow.com/questions/80287', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5302/']