1dotnet-new-search(1) .NET Documentation dotnet-new-search(1)
2
3
4
6 This article applies to: ✔️ .NET Core 5.0.300 SDK and later versions
7
9 dotnet-new-search - searches for the templates supported by dotnet-new
10 on NuGet.org.
11
13 dotnet new search <TEMPLATE_NAME>
14
15 dotnet new search [<TEMPLATE_NAME>] [--author <AUTHOR>] [-lang|--language {"C#"|"F#"|VB}]
16 [--package <PACKAGE>] [--tag <TAG>] [--type <TYPE>]
17 [--columns <COLUMNS>] [--columns-all]
18 [-d|--diagnostics] [--verbosity <LEVEL>] [-h|--help]
19
21 The dotnet new search command searches for templates supported by dot‐
22 net new on NuGet.org. When the is specified, searches for templates
23 containing the specified name.
24
25 Starting with the .NET 7 SDK, the dotnet new syntax has changed:
26
27 • The --list, --search, --install, and --uninstall options became list,
28 search, install and uninstall subcommands.
29
30 • The --update-apply option became the update subcommand.
31
32 • To use --update-check, use the update subcommand with the --check-on‐
33 ly option.
34
35 Other options that were available before are still available to use
36 with their respective subcommands. Separate help for each subcommand
37 is available via the -h or --help option: dotnet new <subcommand>
38 --help lists all supported options for the subcommand.
39
40 Additionally, tab completion is now available for dotnet new. It sup‐
41 ports completion for installed template names and for the options a se‐
42 lected template provides. To activate tab completion for the .NET SDK,
43 see Enable tab completion. > > Examples of the old syntax: > > -
44 Search for all templates available on NuGet.org matching the “we” sub‐
45 string and supporting the F# language > > dotnetcli > dotnet new we
46 --search --language "F#" >
47
49 • TEMPLATE_NAME
50
51 If the argument is specified, only templates containing <TEM‐
52 PLATE_NAME> in the template name or short name will be shown. The
53 argument is mandatory when --author, --language, --package, --tag or
54 --type options are not specified.
55
56 Starting with .NET SDK 6.0.100, you can put the <TEM‐
57 PLATE_NAME> argument after the --search option. For example,
58 dotnet new --search web provides the same result as dotnet new
59 web --search. Using more than one argument is not allowed.
60
62 • --author <AUTHOR>
63
64 Filters templates based on template author. Partial match is sup‐
65 ported.
66
67 • --columns <COLUMNS>
68
69 Comma-separated list of columns to display in the output. The sup‐
70 ported columns are:
71
72 • language - A comma-separated list of languages supported by the
73 template.
74
75 • tags - The list of template tags.
76
77 • author - The template author.
78
79 • type - The template type: project or item.
80
81 The template name, short name, package name and total downloads count
82 are always shown. The default list of columns is template name,
83 short name, author, language, package, and total downloads. This
84 list is equivalent to specifying --columns=author,language.
85
86 • --columns-all
87
88 Displays all columns in the output.
89
90 • -d|--diagnostics
91
92 Enables diagnostic output. Available since .NET SDK 7.0.100.
93
94 • -h|--help
95
96 Prints out help for the search command. Available since .NET SDK
97 7.0.100.
98
99 • -lang|--language {C#|F#|VB}
100
101 Filters templates based on language supported by the template. The
102 language accepted varies by the template. Not valid for some tem‐
103 plates.
104
105 Some shells interpret # as a special character. In those cas‐
106 es, enclose the language parameter value in quotes. For exam‐
107 ple, dotnet new --search --language "F#".
108
109 • --package <PACKAGE>
110
111 Filters templates based on NuGet package ID. Partial match is sup‐
112 ported.
113
114 • --tag <TAG>
115
116 Filters templates based on template tags. To be selected, a template
117 must have at least one tag that exactly matches the criteria.
118
119 • --type <TYPE>
120
121 Filters templates based on template type. Predefined values are
122 project, item, and solution.
123
124 • -v|--verbosity <LEVEL>
125
126 Sets the verbosity level of the command. Allowed values are q[uiet],
127 m[inimal], n[ormal], and diag[nostic]. Available since .NET SDK
128 7.0.100.
129
130 To ensure that the template package appears in dotnet new --search
131 result, set the NuGet package type to Template.
132
134 • Search for all templates available on NuGet.org matching the spa sub‐
135 string.
136
137 dotnet new search spa
138
139 • Search for all templates available on NuGet.org matching the we sub‐
140 string and supporting the F# language.
141
142 dotnet new search we --language "F#"
143
144 • Search for item templates.
145
146 dotnet new search --type item
147
148 • Search for all C# templates, showing the type and tags in the output.
149
150 dotnet new search --language "C#" --columns "type,tags"
151
153 • dotnet new command
154
155 • dotnet new list command
156
157 • Custom templates for dotnet new
158
159
160
161 2022-11-08 dotnet-new-search(1)