dotnet why - a .NET global tool to show information about why a NuGet package is installed |
Download and install the .NET 6/8 SDK.
Once installed, run the following command:
> dotnet tool install -g DotNetWhy
> dotnet why Newtonsoft.Json
Why...?
* is the *Newtonsoft.Json* package
* in the C:\DotNetWhy directory
Answer:
* DotNetWhy [2]
** DotNetWhy.Core [2/2]
*** net6.0 [1/2]
1. NuGet.ProjectModel (6.7.0) > NuGet.DependencyResolver.Core (6.7.0) > NuGet.Protocol (6.7.0) >
NuGet.Packaging (6.7.0) > Newtonsoft.Json (13.0.1)
*** net8.0 [1/2]
1. NuGet.ProjectModel (6.7.0) > NuGet.DependencyResolver.Core (6.7.0) > NuGet.Protocol (6.7.0) >
NuGet.Packaging (6.7.0) > Newtonsoft.Json (13.0.1)
Time elapsed: 00:00:03.01
The mandatory query argument for dotnet why
command is package name:
> dotnet why Newtonsoft.Json
At this moment, the only additional optional query argument for dotnet why
command is --version|-v
option:
> dotnet why Newtonsoft.Json --version 13.0.1
> dotnet why Newtonsoft.Json -v 13.0.2