Add deps command for dependency tree visualization #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a new
depscommand that creates a tree-like output structure showing project and NuGet package dependencies in a solution or specific project.Features
Tree Visualization: The command displays dependencies in a hierarchical tree format with Unicode characters:
Flexible Analysis:
bld deps(finds all .sln files in current directory)bld deps --project MyProject.csprojNuGet Package Control: The
--nugetoption allows including or excluding NuGet package references:bld deps --nuget=true(default) - shows both project and package dependenciesbld deps --nuget=false- shows only project referencesAdvanced Package Support:
[Private]annotationCircular Reference Detection: Prevents infinite recursion by detecting and marking circular project references with
[CIRCULAR REFERENCE].Reusable Architecture
The implementation provides reusable components as requested:
DependencyAnalyzerservice for building dependency treesDependencyInfo,ProjectReference,PackageReferencemodels for structured dependency dataDependencyNodefor tree representationThis infrastructure can be easily extended for future nuget package version compatibility checking as mentioned in the requirements.
Usage Examples
The command integrates seamlessly with the existing CLI structure and follows the same patterns as other commands in the codebase.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.