Skip to content

Instantly share code, notes, and snippets.

@raghur
Last active January 30, 2016 06:11
Show Gist options
  • Save raghur/b81149c173d653c71eb9 to your computer and use it in GitHub Desktop.
Save raghur/b81149c173d653c71eb9 to your computer and use it in GitHub Desktop.
Generate project dependency graph from csproj files.
gfind -maxdepth 2 -name *.csproj |xargs grep -i "ProjectReference Include"| grep -Pino [a-zA-Z.]+\.csproj| awk -F: -f e:\depgraph.awk > graph.md
mermaid -p graph.md
BEGIN {print "graph LR";
line=0;
}
{
if (line!=$1) {
printf "\t%s",$2;
line = $1;
}
else {
print "-->", $2
}
}
@raghur
Copy link
Author

raghur commented Jan 30, 2016

Generate dependency graph from csproj files in a folder. assumes 2 levels. Requires gnu tools & mermaid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment