1dotnet-new-list(1)            .NET Documentation            dotnet-new-list(1)
2
3
4

dotnet new list

6       This article applies to: ✔️ .NET Core 3.1 SDK and later versions
7

NAME

9       dotnet-new-list - Lists available templates to be run using dotnet-new.
10

SYNOPSIS

12              dotnet new list [<TEMPLATE_NAME>] [--author <AUTHOR>] [-lang|--language {"C#"|"F#"|VB}]
13                  [--tag <TAG>] [--type <TYPE>] [--columns <COLUMNS>] [--columns-all]
14                  [-o|--output <output>] [--project <project>] [--ignore-constraints]
15                  [-d|--diagnostics] [--verbosity <LEVEL>] [-h|--help]
16

DESCRIPTION

18       The  dotnet new list command lists available templates to use with dot‐
19       net new.  If the is specified, lists templates containing the specified
20       name.  This option lists only default and installed templates.  To find
21       templates in NuGet that you can install locally, use  the  search  com‐
22       mand.
23
24       Starting with .NET SDK 7.0.100, the list command might not show all the
25       templates installed on the machine.  It takes the  result  of  template
26       constraints into account, and the templates that can’t be used won’t be
27       shown.  To force show all the templates, use  the  --ignore-constraints
28       option.
29
30       Starting with the .NET 7 SDK, the dotnet new syntax has changed:
31
32       • The --list, --search, --install, and --uninstall options became list,
33         search, install and uninstall subcommands.
34
35       • The --update-apply option became the update subcommand.
36
37       • To use --update-check, use the update subcommand with the --check-on‐
38         ly option.
39
40       Other  options  that  were  available before are still available to use
41       with their respective subcommands.  Separate help for  each  subcommand
42       is  available  via  the  -h  or  --help option: dotnet new <subcommand>
43       --help lists all supported options for the subcommand.
44
45       Additionally, tab completion is now available for dotnet new.  It  sup‐
46       ports completion for installed template names and for the options a se‐
47       lected template provides.  To activate tab completion for the .NET SDK,
48       see  Enable tab completion.  > > Examples of the old syntax: > > - List
49       all Single Page Application (SPA) templates: > - since .NET SDK 6.0.100
50       > > dotnetcli >   dotnet new --list spa > > > - before .NET SDK 6.0.100
51       > > dotnetcli >   dotnet new spa --list >
52

ARGUMENTS

54TEMPLATE_NAME
55
56         If the argument is specified, only  the  templates  containing  <TEM‐
57         PLATE_NAME> in template name or short name will be shown.
58

OPTIONS

60--author <AUTHOR>
61
62         Filters  templates  based  on template author.  Partial match is sup‐
63         ported.  Available since .NET SDK 5.0.300.
64
65--columns <COLUMNS>
66
67         Comma-separated list of columns to display in the output.   The  sup‐
68         ported columns are:
69
70language  -  A  comma-separated  list of languages supported by the
71           template.
72
73tags - The list of template tags.
74
75author - The template author.
76
77type - The template type: project or item.
78
79         The template name and short name are always shown.  The default  list
80         of  columns  is  template name, short name, language, and tags.  This
81         list is equivalent to specifying --columns=language,tags.   Available
82         since .NET SDK 5.0.300.
83
84--columns-all
85
86         Displays  all  columns  in  the  output.   Available  since  .NET SDK
87         5.0.300.
88
89-d|--diagnostics
90
91         Enables diagnostic output.  Available since .NET SDK 7.0.100.
92
93-h|--help
94
95         Prints out help for the  list  command.   Available  since  .NET  SDK
96         7.0.100.
97
98--ignore-constraints
99
100         Disables  checking  if  the template meets the constraints to be run.
101         Available since .NET SDK 7.0.100.
102
103-lang|--language {C#|F#|VB}
104
105         Filters templates based on language supported by the  template.   The
106         language  accepted  varies  by the template.  Not valid for some tem‐
107         plates.
108
109                Some shells interpret # as a special character.  In those cas‐
110                es, enclose the language parameter value in quotes.  For exam‐
111                ple, dotnet new --list --language "F#".
112
113-o|--output <OUTPUT_DIRECTORY>
114
115         Location to place the generated output.  The default is  the  current
116         directory.   For  the  list command, it might be necessary to specify
117         the output directory to correctly evaluate constraints for  the  tem‐
118         plate.  Available since .NET SDK 7.0.100.
119
120--project <PROJECT_PATH>
121
122         The  project that the template is added to.  For the list command, it
123         might be needed to specify the project the template is being added to
124         to  correctly evaluate constraints for the template.  Available since
125         .NET SDK 7.0.100.
126
127--tag <TAG>
128
129         Filters templates based on template tags.  To be selected, a template
130         must have at least one tag that exactly matches the criteria.  Avail‐
131         able since .NET SDK 5.0.300.
132
133--type <TYPE>
134
135         Filters templates based on  template  type.   Predefined  values  are
136         project, item, and solution.
137
138-v|--verbosity <LEVEL>
139
140         Sets the verbosity level of the command.  Allowed values are q[uiet],
141         m[inimal], n[ormal], and  diag[nostic].   Available  since  .NET  SDK
142         7.0.100.
143

EXAMPLES

145       • List all templates
146
147                dotnet new list
148
149       • List all Single Page Application (SPA) templates:
150
151                dotnet new list spa
152
153       • List all templates matching the we substring.
154
155                dotnet new list we
156
157       • List all templates matching the we substring that support the F# lan‐
158         guage.
159
160                dotnet new list we --language "F#"
161
162       • List all item templates.
163
164                dotnet new list --type item
165
166       • List all C# templates, showing the author and the type in the output.
167
168                dotnet new list --language "C#" --columns "author,type"
169

SEE ALSO

171       • dotnet new command
172
173       • dotnet new search command
174
175       • Custom templates for dotnet new
176
177
178
179                                  2022-11-08                dotnet-new-list(1)
Impressum