dotnet-nuget-why - Man Page

Shows the dependency graph for a particular package.

dotnet nuget why

This article applies to: ✔️ .NET 8.0.4xx SDK and later versions

Synopsis

dotnet nuget why <PROJECT|SOLUTION> <PACKAGE> [-f|--framework <FRAMEWORK>]

dotnet nuget why -h|--help

Description

The dotnet nuget why command shows the dependency graph for a particular package for a given project or solution.

Starting from the .NET 9 SDK, it’s possible to pass a NuGet assets file in place of the project file, in order to use the command with projects that can’t be restored with the .NET SDK. First, restore the project in Visual Studio, or msbuild.exe. By default the assets file is in the project’s obj\ directory, but you can find the location with msbuild.exe path\to\project.proj -getProperty:ProjectAssetsFile. Finally, run dotnet nuget why path\to\project.assets.json SomePackage.

Arguments

Options

Examples

Info

2024-10-02 .NET Documentation