Skip to main content

Creating a dependency graph using Github Copilot

Today I was in a meeting with 2 colleagues where we were discussing a specific solution. We were investigating which component had dependencies on which other component to find a way to simplify the architecture and limit the number of dependencies.

After the meeting I wondered if Github Copilot could help. I opened the solution in Visual Studio and tried a first prompt:

Create me a mermaid diagram showing all projects with their dependencies

That didn’t resulted in what I hoped for. By default Visual Studio doesn’t automatically include context. Let’s fix that by adding @workspace:

That look’s promising! Let’s copy the result over to a mermaid visualizer tool:

Exactly what I was looking for. Nice!