1dotnet list package command(1)     .NET Core    dotnet list package command(1)
2
3
4

dotnet list package

NAME

7       dotnet list package - Lists the package references for a project or so‐
8       lution.
9

SYNOPSIS

11              dotnet list [<PROJECT>|<SOLUTION>] package [--config] [--framework] [--highest-minor] [--highest-patch]
12                 [--include-prerelease] [--include-transitive] [--interactive] [--outdated] [--source]
13              dotnet list package [-h|--help]
14

DESCRIPTION

16       The dotnet list package command provides a convenient  option  to  list
17       all NuGet package references for a specific project or a solution.  You
18       first need to build the project in order to have the assets needed  for
19       this command to process.  The following example shows the output of the
20       dotnet list package command for the SentimentAnalysis project:
21
22              Project 'SentimentAnalysis' has the following package references
23                 [netcoreapp2.1]:
24                 Top-level Package               Requested   Resolved
25                 > Microsoft.ML                  0.11.0      0.11.0
26                 > Microsoft.NETCore.App   (A)   [2.1.0, )   2.1.0
27
28              (A) : Auto-referenced package.
29
30       The Requested column refers to the package  version  specified  in  the
31       project file and can be a range.  The Resolved column lists the version
32       that the project is currently using and is always a single value.   The
33       packages displaying an (A) right next to their names represent implicit
34       package references that are inferred from your  project  settings  (Sdk
35       type, <TargetFramework> or <TargetFrameworks> property, etc.)
36
37       Use  the  --outdated  option  to  find  out if there are newer versions
38       available of the packages you’re using in your projects.   By  default,
39       --outdated lists the latest stable packages unless the resolved version
40       is also a prerelease version.   To  include  prerelease  versions  when
41       listing  newer  versions, also specify the --include-prerelease option.
42       The following examples shows the output  of  the  dotnet  list  package
43       --outdated  --include-prerelease  command  for  the same project as the
44       previous example:
45
46              The following sources were used:
47                 https://api.nuget.org/v3/index.json
48
49              Project `SentimentAnalysis` has the following updates to its packages
50                 [netcoreapp2.1]:
51                 Top-level Package      Requested   Resolved   Latest
52                 > Microsoft.ML         0.11.0      0.11.0     1.0.0-preview
53
54       If you need to find out whether your project has  transitive  dependen‐
55       cies, use the --include-transitive option.  Transitive dependencies oc‐
56       cur when you add a package to your project that in turn relies  on  an‐
57       other package.  The following example shows the output from running the
58       dotnet list package --include-transitive command  for  the  HelloPlugin
59       project, which displays top-level packages and the packages they depend
60       on:
61
62              Project 'HelloPlugin' has the following package references
63                 [netcoreapp3.0]:
64                 Top-level Package                      Requested                    Resolved
65                 > Microsoft.NETCore.Platforms    (A)   [3.0.0-preview3.19128.7, )   3.0.0-preview3.19128.7
66                 > Microsoft.WindowsDesktop.App   (A)   [3.0.0-preview3-27504-2, )   3.0.0-preview3-27504-2
67
68                 Transitive Package               Resolved
69                 > Microsoft.NETCore.Targets      2.0.0
70                 > PluginBase                     1.0.0
71
72              (A) : Auto-referenced package.
73
74   Arguments
75       PROJECT | SOLUTION
76
77       The project or solution file to operate on.  If not specified, the com‐
78       mand searches the current directory for one.  If more than one solution
79       or project is found, an error is thrown.
80

OPTIONS

82       · --config <SOURCE>
83
84         The NuGet sources to use when searching for newer packages.  Requires
85         the --outdated option.
86
87       · --framework <FRAMEWORK>
88
89         Displays only the packages applicable for the specified target frame‐
90         work.  To specify multiple frameworks,  repeat  the  option  multiple
91         times.   For  example: --framework netcoreapp2.2 --framework netstan‐
92         dard2.0.
93
94       · -h|--help
95
96         Prints out a short help for the command.
97
98       · --highest-minor
99
100         Considers only the packages with a matching major version number when
101         searching for newer packages.  Requires the --outdated option.
102
103       · --highest-patch
104
105         Considers  only  the packages with a matching major and minor version
106         numbers when searching for newer packages.  Requires  the  --outdated
107         option.
108
109       · --include-prerelease
110
111         Considers  packages with prerelease versions when searching for newer
112         packages.  Requires the --outdated option.
113
114       · --include-transitive
115
116         Lists transitive packages, in addition  to  the  top-level  packages.
117         When specifying this option, you get a list of packages that the top-
118         level packages depend on.
119
120       · --interactive
121
122         Allows the command to stop and wait for user input  or  action.   For
123         example,  to  complete authentication.  Available since .NET Core 3.0
124         SDK.
125
126       · --outdated
127
128         Lists packages that have newer versions available.
129
130       · -s|--source <SOURCE>
131
132         The NuGet sources to use when searching for newer packages.  Requires
133         the --outdated option.
134

EXAMPLES

136       · List package references of a specific project:
137
138                dotnet list SentimentAnalysis.csproj package
139
140       · List package references that have newer versions available, including
141         prerelease versions:
142
143                dotnet list package --outdated --include-prerelease
144
145       · List package references for a specific target framework:
146
147                dotnet list package --framework netcoreapp3.0
148
149
150
151                                                dotnet list package command(1)
Impressum