dotnet-nuget-why(1)
okay bestie, sit down, hydrate, and let's talk about dotnet-nuget-why π
this page lives in the .NET Documentation, and heads up: it applies to .NET 8.0.4xx SDK and later versions. no cap. π
β¨ NAME β¨
dotnet-nuget-why β shows the dependency graph for a particular package. that's the whole vibe. π¦
π SYNOPSIS π
dotnet nuget why [<PROJECT|SOLUTION>] <PACKAGE> [-f|--framework <FRAMEWORK>]
dotnet nuget why -h|--help
πΈ DESCRIPTION πΈ
So the dotnet nuget why command shows the dependency graph for a particular package, for a given project or solution. it's giving "explain yourself, package." π
Starting with version 9.0.200, the command introduces support for runtime identifier (RID) specific packages by generating separate dependency trees for each RID and framework combination. for example, if a project targets net9.0 with the win-x64 RID, the command generates trees for net9.0/win-x64 and net9.0. multiple trees?? she's thorough. π
π§ Older project format π§
To use the command with projects that can't be restored with the .NET SDK, you can pass a NuGet assets file in place of the project file (starting with the .NET 9 SDK):
- First, restore the project in Visual Studio or using
msbuild.exe. By default, the assets file is in the project'sobj\directory, but you can find the location withmsbuild.exe path\to\project.proj -getProperty:ProjectAssetsFile. - Run
dotnet nuget why path\to\project.assets.json SomePackage.
lowkey iconic that you can just hand it an assets file instead of a project file. iykyk. π«Ά
π ARGUMENTS π
PROJECT|SOLUTIONβ the project or solution file to operate on. if a directory is specified, the command searches the directory for a project or solution file. if more than one project or solution is found, an error is thrown. if no value is provided, the current working directory is used by default. (yes, it just assumes you mean here. main character energy. π )PACKAGEβ the package name to look up in the dependency graph. the whole reason we're here fr fr.
π OPTIONS π
-f|--framework <FRAMEWORK>β the target framework(s) for which dependency graphs are shown. you can pass multiple--frameworkoptions to see graphs for more than one framework. stack 'em. π₯-?|-h|--helpβ prints out a description of how to use the command. your bestie when you forget literally everything.
π EXAMPLES π
- Show the dependency graph for the package "System.Text.Json":
dotnet nuget why System.Text.Json
[IMAGE: Example: Solution with multiple projects]
- Show the dependency graph for the package "System.Text.Json" for a specific project:
dotnet nuget why path/to/DotnetNuGetWhyPackage.csproj System.Text.Json
- Show the dependency graph for a specific target framework:
dotnet nuget why System.Text.Json --framework net6.0
and that's the whole page, bestie. π this one's from the .NET Documentation, dated 2025-10-30, and you can find it filed under dotnet-nuget-why(1). go forth and ask your packages why they're here. periodt. β¨π
π¦ where this page comes from
- alpine 3.24: dotnet-doc 10.0.303-r2 Β· MIT
- centos-stream 10: dotnet-host 11.0.0~rc.2.26504.105-0.10.el10 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- centos-stream 9: dotnet-host 11.0.0~rc.2.26504.105-0.11.el9 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 43: dotnet-host 10.0.12-1.fc43
- fedora 43: dotnet-host 11.0.0~rc.1.26425.128-0.10.fc43 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 44: dotnet-host 10.0.12-1.fc44
- fedora 44: dotnet-host 10.0.4-1.fc44 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 44: dotnet-host 11.0.0~rc.1.26425.128-0.12.fc44 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- nixpkgs unstable: dotnet-vmr 11.0.0-rc.3
- ubuntu noble: dotnet-host-10.0 10.0.12-0ubuntu1~24.04.1
- ubuntu questing: dotnet-host-10.0 10.0.9-0ubuntu1~25.10.1
- ubuntu resolute: dotnet-host-10.0 10.0.12-0ubuntu1~26.04.1
- ubuntu resolute: dotnet-host-10.0 10.0.5-0ubuntu1 Β· MIT
- ubuntu stonking: dotnet-host-10.0 10.0.12-0ubuntu2 Β· MIT
- ubuntu stonking: dotnet-host-11.0 11.0.0~rc1-0ubuntu1 Β· MIT
- ubuntu stonking: dotnet-host-11.0 11.0.0~rc3-0ubuntu1~26.10.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms