Skip to content

A .NET global tool to show information about why a NuGet package is installed

License

Notifications You must be signed in to change notification settings

tadamczyk/DotNetWhy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotnet why - a .NET global tool to show information about why a NuGet package is installed
Nuget GitHub Nuget GitHub Workflow Status GitHub Workflow Status GitHub issues GitHub pull requests

Installation

Download and install the .NET 6/8 SDK.

Once installed, run the following command:

> dotnet tool install -g DotNetWhy

Example

> 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

Usage

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