When developing dotnet and upgrading to the new csproj-format, i had to find a way to cleanup nuget transitive dependencies.
I stumbled upon this thread (Part 1/Part 2) from Jerrie Pelser. He wrote a application to visualize the dependency tree of a dotnet-Project.
I added some logic to output the irrelevant dependencies, to safely remove them. If dependency D is imported already by dependency C, the direct reference can be removed. This gives us a cleaner NuGet-Dependency-Tree.