1(1)                                  .NET                                  (1)
2
3
4

dotnet new –search option

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

NAME

9       dotnet  new  --search  - searches for the templates supported by dotnet
10       new on NuGet.org.
11

SYNOPSIS

13              dotnet new <TEMPLATE_NAME> --search
14
15              dotnet new [<TEMPLATE_NAME>] --search [--author <AUTHOR>] [-lang|--language {"C#"|"F#"|VB}]
16                  [--package <PACKAGE>] [--tag <TAG>] [--type <TYPE>]
17                  [--columns <COLUMNS>] [--columns-all]
18

DESCRIPTION

20       The dotnet new --search option searches for templates supported by dot‐
21       net  new  on  NuGet.org.  When the is specified, searches for templates
22       containing the specified name.
23
24   Arguments
25TEMPLATE_NAME
26
27         If  the  argument  is  specified,  only  templates  containing  <TEM‐
28         PLATE_NAME>  in  the  template name or short name will be shown.  The
29         argument is mandatory when --author, --language, --package, --tag  or
30         --type options are not specified.
31

OPTIONS

33--author <AUTHOR>
34
35         Filters  templates  based  on template author.  Partial match is sup‐
36         ported.
37
38--columns <COLUMNS>
39
40         Comma-separated list of columns to display in the output.   The  sup‐
41         ported columns are:
42
43         • language  -  A  comma-separated  list of languages supported by the
44           template.
45
46         • tags - The list of template tags.
47
48         • author - The template author.
49
50         • type - The template type: project or item.
51
52         The template name, short name, package name and total downloads count
53         are  always  shown.   The  default  list of columns is template name,
54         short name, author, language, package,  and  total  downloads.   This
55         list is equivalent to specifying --columns=author,language.
56
57--columns-all
58
59         Displays all columns in the output.
60
61-lang|--language {C#|F#|VB}
62
63         Filters  templates  based on language supported by the template.  The
64         language accepted varies by the template.  Not valid  for  some  tem‐
65         plates.
66
67                [!NOTE]  Some  shells  interpret # as a special character.  In
68                those cases, enclose the language parameter value  in  quotes.
69                For example, dotnet new --search --language "F#".
70
71--package <PACKAGE>
72
73         Filters  templates  based on NuGet package ID.  Partial match is sup‐
74         ported.
75
76--tag <TAG>
77
78         Filters templates based on template tags.  To be selected, a template
79         must have at least one tag that exactly matches the criteria.
80
81--type <TYPE>
82
83         Filters  templates  based  on  template  type.  Predefined values are
84         project and item.
85

EXAMPLES

87       • Search for all templates available on NuGet.org matching the spa sub‐
88         string.
89
90                dotnet new spa --search
91
92       • Search  for all templates available on NuGet.org matching the we sub‐
93         string and supporting the F# language.
94
95                dotnet new we --search --language "F#"
96
97       • Search for item templates.
98
99                dotnet new --search --type item
100
101       • Search for all C# templates, showing the type and tags in the output.
102
103                dotnet new --search --language "C#" --columns "type,tags"
104
105   See also
106       • dotnet new command
107
108       • dotnet new –list option
109
110       • Custom templates for dotnet new
111
112
113
114                                                                           (1)
Impressum