The DotNetDepends tool scans a folder containing assemblies and config file and generates a DGML file of the assembly dependencies.
$ dotnet add package DotNetDependsThe DotNetDepends tool scans a folder containing assemblies and config file and generates a DGML file of the assembly dependencies.
Built with net8.0
usage: DotNetDepends.exe [path] [outFile]
path = Input directory containing assembly (.exe|.dll) files.
outFile = Output assembly dependencies Directed Graph document (.dgml) file.
The DotNetDepends tool can be called post-build to generate an Assembly Dependency graph DGML file from build output.
<PackageReference Include="DotNetDepends" Version="1.135.0" ExcludeAssets="All" GeneratePathProperty="true" />
<!-- NOTE: Run the following command to create Assembly Dependency graph DGML file: dotnet build -p:dgml=1 -->
<Target Name="AssemblyDependencies" AfterTargets="PostBuildEvent" Condition="($(dgml) != '')">
<Exec Command="$(PkgDotNetDepends)\tools\DotNetDepends.exe "$(TargetDir.TrimEnd('\\'))" "$(MSBuildProjectDirectory)\$(MSBuildProjectName)-Dependencies.dgml"" />
</Target>
Open the generated DGML file in Visual Studio with "DGML Editor" component installed.
How to: Modify Visual Studio workloads, components, and language packs
©2024 Microsoft Corporation aluty@microsoft.com