dotnet list package

dotnet list package --help

eg@debian:~$ dotnet list package --help
Description:
  List all package references of the project or solution.

Usage:
  dotnet list [<PROJECT | SOLUTION>] package [options]

Arguments:
  <PROJECT | SOLUTION>  The project or solution file to operate on. If a file is not specified, the command will search the current directory for one. [default: /home/eg/]

Options:
  -v, --verbosity <LEVEL>                  Set the MSBuild verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].
  --outdated                               Lists packages that have newer versions. Cannot be combined with '--deprecated' or '--vulnerable' options.
  --deprecated                             Lists packages that have been deprecated. Cannot be combined with '--vulnerable' or '--outdated' options.
  --vulnerable                             Lists packages that have known vulnerabilities. Cannot be combined with '--deprecated' or '--outdated' options.
  --framework <FRAMEWORK | FRAMEWORK\RID>  Chooses a framework to show its packages. Use the option multiple times for multiple frameworks.
  --include-transitive                     Lists transitive and top-level packages.
  --include-prerelease                     Consider packages with prerelease versions when searching for newer packages. Requires the '--outdated' option.
  --highest-patch                          Consider only the packages with a matching major and minor version numbers when searching for newer packages. Requires the '--outdated' option.
  --highest-minor                          Consider only the packages with a matching major version number when searching for newer packages. Requires the '--outdated' option.
  --config <CONFIG_FILE>                   The path to the NuGet config file to use. Requires the '--outdated', '--deprecated' or '--vulnerable' option.
  --source <SOURCE>                        The NuGet sources to use when searching for newer packages. Requires the '--outdated', '--deprecated' or '--vulnerable' option.
  --interactive                            Allows the command to stop and wait for user input or action (for example to complete authentication).
  --format <console|json>                  Specifies the output format type for the list packages command.
  --output-version <output-version>        Specifies the version of machine-readable output. Requires the '--format json' option.
  -?, -h, --help                           Show command line help.

dotnet list <project_file_path> package

eg@debian:~$ dotnet list ./Data/DotnetCliExamples/ExampleSolution/ExampleSolution.WebApi1/ExampleSolution.WebApi1.csproj package
Project 'ExampleSolution.WebApi1' has the following package references
   [net7.0]: 
   Top-level Package                    Requested   Resolved
   > Autofac                            7.1.0       7.1.0   
   > Microsoft.AspNetCore.OpenApi       7.0.9       7.0.9   
   > Microsoft.EntityFrameworkCore      7.0.10      7.0.10  
   > Swashbuckle.AspNetCore             6.5.0       6.5.0 

Last updated