1(1) .NET (1)
2
3
4
6 This article applies to: ✔️ .NET Core 2.0 SDK and later versions
7
9 dotnet new --list - Lists available templates to be run using dotnet
10 new.
11
13 dotnet new [<TEMPLATE_NAME>] -l|--list [--author <AUTHOR>] [-lang|--language {"C#"|"F#"|VB}]
14 [--tag <TAG>] [--type <TYPE>] [--columns <COLUMNS>] [--columns-all]
15
17 The dotnet new --list option lists available templates to use with dot‐
18 net new. If the is specified, lists templates containing the specified
19 name. This option lists only default and installed templates. To find
20 templates in NuGet that you can install locally, use the --search op‐
21 tion.
22
23 Arguments
24 • TEMPLATE_NAME
25
26 If the argument is specified, only the templates containing <TEM‐
27 PLATE_NAME> in template name or short name will be shown.
28
30 • --author <AUTHOR>
31
32 Filters templates based on template author. Partial match is sup‐
33 ported. Available since .NET Core 5.0.300 SDK.
34
35 • --columns <COLUMNS>
36
37 Comma-separated list of columns to display in the output. The sup‐
38 ported columns are:
39
40 • language - A comma-separated list of languages supported by the
41 template.
42
43 • tags - The list of template tags.
44
45 • author - The template author.
46
47 • type - The template type: project or item.
48
49 The template name and short name are always shown. The default list
50 of columns is template name, short name, language, and tags. This
51 list is equivalent to specifying --columns=language,tags. Available
52 since .NET Core 5.0.300 SDK.
53
54 • --columns-all
55
56 Displays all columns in the output. Available since .NET Core
57 5.0.300 SDK.
58
59 • -lang|--language {C#|F#|VB}
60
61 Filters templates based on language supported by the template. The
62 language accepted varies by the template. Not valid for some tem‐
63 plates.
64
65 [!NOTE] Some shells interpret # as a special character. In
66 those cases, enclose the language parameter value in quotes.
67 For example, dotnet new --list --language "F#".
68
69 • --tag <TAG>
70
71 Filters templates based on template tags. To be selected, a template
72 must have at least one tag that exactly matches the criteria. Avail‐
73 able since .NET Core 5.0.300 SDK.
74
75 • --type <TYPE>
76
77 Filters templates based on template type. Predefined values are
78 project and item.
79
81 • List all templates
82
83 dotnet new --list
84
85 • List all Single Page Application (SPA) templates:
86
87 dotnet new spa --list
88
89 • List all templates matching the we substring.
90
91 dotnet new we --list
92
93 • List all templates matching the we substring that support the F# lan‐
94 guage.
95
96 dotnet new we --list --language "F#"
97
98 • List all item templates.
99
100 dotnet new --list --type item
101
102 • List all C# templates, showing the author and the type in the output.
103
104 dotnet new --list --language "C#" --columns "author,type"
105
106 See also
107 • dotnet new command
108
109 • dotnet new –search option
110
111 • Custom templates for dotnet new
112
113
114
115 (1)