1dotnet-new-sdk-templates(7)   .NET Documentation   dotnet-new-sdk-templates(7)
2
3
4

NAME

6       dotnet-new-sdk-templates - .NET default templates for dotnet new
7

DESCRIPTION

9       When  you install the .NET SDK (https://dotnet.microsoft.com/download),
10       you receive over a dozen built-in templates for creating  projects  and
11       files,  including  console  apps,  class libraries, unit test projects,
12       ASP.NET Core apps (including Angular  (https://angular.io/)  and  React
13       (https://reactjs.org/) projects), and configuration files.  To list the
14       built-in templates, run the dotnet new list command:
15
16              dotnet new list
17
18       The following table shows the templates that  come  pre-installed  with
19       the  .NET  SDK.   The default language for the template is shown inside
20       the brackets.  Click on the short name link to see  the  specific  tem‐
21       plate options.
22
23       Templates       Short name      Language       Tags            Introduced
24       ─────────────────────────────────────────────────────────────────────────────
25       Console   Ap‐   console         [C#], F#, VB   Common/Con‐     1.0
26       plication                                      sole
27       Class library   classlib        [C#], F#, VB   Common/Li‐      1.0
28                                                      brary
29       WPF  Applica‐   wpf             [C#], VB       Common/WPF      3.0  (5.0 for
30       tion                                                           VB)
31       WPF Class li‐   wpflib          [C#], VB       Common/WPF      3.0  (5.0 for
32       brary                                                          VB)
33       WPF    Custom   wpfcustomcon‐   [C#], VB       Common/WPF      3.0  (5.0 for
34       Control   Li‐   trollib                                        VB)
35       brary
36       WPF User Con‐   wpfusercon‐     [C#], VB       Common/WPF      3.0 (5.0  for
37       trol Library    trollib                                        VB)
38       Windows Forms   winforms        [C#], VB       Common/Win‐     3.0 (5.0  for
39       (WinForms)                                     Forms           VB)
40       Application
41       Windows Forms   winformslib     [C#], VB       Common/Win‐     3.0 (5.0  for
42       (WinForms)                                     Forms           VB)
43       Class library
44       Worker   Ser‐   worker          [C#]           Common/Work‐    3.0
45       vice                                           er/Web
46       Unit     Test   mstest          [C#], F#, VB   Test/MSTest     1.0
47       Project
48       NUnit 3  Test   nunit           [C#], F#, VB   Test/NUnit      2.1.400
49       Project
50       NUnit  3 Test   nunit-test      [C#], F#, VB   Test/NUnit      2.2
51       Item
52       xUnit    Test   xunit           [C#], F#, VB   Test/xUnit      1.0
53       Project
54       Razor  Compo‐   razorcompo‐     [C#]           Web/ASP.NET     3.0
55       nent            nent
56       Razor Page      page            [C#]           Web/ASP.NET     2.0
57       MVC   ViewIm‐   viewimports     [C#]           Web/ASP.NET     2.0
58       ports
59       MVC ViewStart   viewstart       [C#]           Web/ASP.NET     2.0
60       Blazor Server   blazorserver    [C#]           Web/Blazor      3.0
61       App
62       Blazor Server   blazorserver-   [C#]           Web/Blazor      7.0
63       App Empty       empty
64
65
66
67       Blazor    We‐   blazorwasm      [C#]           Web/Bla‐        3.1.300
68       bAssembly App                                  zor/WebAssem‐
69                                                      bly
70       Blazor    We‐   blazorwasm-     [C#]           Web/Bla‐        7.0
71       bAssembly App   empty                          zor/WebAssem‐
72       Empty                                          bly
73       ASP.NET  Core   web             [C#], F#       Web/Empty       1.0
74       Empty
75       ASP.NET  Core   mvc             [C#], F#       Web/MVC         1.0
76       Web App (Mod‐
77       el-View-Con‐
78       troller)
79       ASP.NET  Core   webapp, razor   [C#]           Web/MVC/Razor   2.2, 2.0
80       Web App                                        Pages
81       ASP.NET  Core   angular         [C#]           Web/MVC/SPA     2.0
82       with Angular
83       ASP.NET  Core   react           [C#]           Web/MVC/SPA     2.0
84       with React.js
85       ASP.NET  Core   reactredux      [C#]           Web/MVC/SPA     2.0
86       with React.js
87       and Redux
88       Razor   Class   razorclasslib   [C#]           Web/Razor/Li‐   2.1
89       Library                                        brary/Razor
90                                                      Class Library
91       ASP.NET  Core   webapi          [C#], F#       Web/WebAPI      1.0
92       Web API
93       ASP.NET  Core   grpc            [C#]           Web/gRPC        3.0
94       gRPC Service
95       dotnet gitig‐   gitignore                      Config          3.0
96       nore file
97       global.json     globaljson                     Config          2.0
98       file
99       NuGet Config    nugetconfig                    Config          1.0
100       Dotnet  local   tool-manifest                  Config          3.0
101       tool manifest
102       file
103       Web Config      webconfig                      Config          1.0
104       Solution File   sln                            Solution        1.0
105       Protocol Buf‐   proto                          Web/gRPC        3.0
106       fer File
107       EditorConfig    editorcon‐                     Config          6.0
108       file            fig(#editor‐
109                       config)
110
111   Template options
112       Each template may have additional options available.  To show the addi‐
113       tional  options  available  for the template use the --help option with
114       the template name argument, for example: dotnet new console --help.  In
115       case  the  template supports multiple languages, this command will show
116       help for the template in the default language.  By  combining  it  with
117       the --language option, you can see the help for other languages: dotnet
118       new console --help --language F#.  The templates  that  ship  with  the
119       .NET SDK have the following additional options:
120
121   console
122-f|--framework <FRAMEWORK>
123
124         Specifies  the  framework  to  target.  Available since .NET Core 3.0
125         SDK.
126
127         The following table lists the default values  according  to  the  SDK
128         version you’re using:
129
130         SDK version   Default value
131         ────────────────────────────
132
133         7.0           net7.0
134         6.0           net6.0
135         3.1           netcoreapp3.1
136
137         The  ability to create a project for an earlier TFM depends on having
138         that version of the SDK installed.  For example, if you have only the
139         .NET  7  SDK installed, then the only value available for --framework
140         is net7.0.  If you install the .NET 6 SDK the  value  net6.0  becomes
141         available  for  --framework.   If  you install the .NET Core 3.1 SDK,
142         netcoreapp3.1  becomes  available,  and  so  on.   So  by  specifying
143         --framework  netcoreapp3.1  you  can  target .NET Core 3.1 even while
144         running dotnet new in the .NET 6 SDK.
145
146         Alternatively, to create a project that targets a  framework  earlier
147         than  the  SDK  that  you’re using, you might be able to do it by in‐
148         stalling   the   NuGet   package   for    the    template.     Common
149         (https://www.nuget.org/packages?q=Microsoft.DotNet.Common.ProjectTem
150         plates),     web     (https://www.nuget.org/packages?q=Microsoft.Dot
151         Net.Web.ProjectTemplates),   and   SPA   (https://www.nuget.org/pack
152         ages?q=Microsoft.DotNet.Web.Spa.ProjectTemplates) project  types  use
153         different  packages per target framework moniker (TFM).  For example,
154         to create a console project that targets  netcoreapp1.0,  run  dotnet
155         new install on Microsoft.DotNet.Common.ProjectTemplates.1.x.
156
157--langVersion <VERSION_NUMBER>
158
159         Sets the LangVersion property in the created project file.  For exam‐
160         ple, use --langVersion 7.3 to use C#  7.3.   Not  supported  for  F#.
161         Available since .NET Core 2.2 SDK.
162
163         For a list of default C# versions, see Defaults.
164
165--no-restore
166
167         If specified, doesn’t execute an implicit restore during project cre‐
168         ation.  Available since .NET Core 2.2 SDK.
169
170--use-program-main
171
172         If specified, an explicit Program class and Main method will be  used
173         instead  of  top-level statements.  Available since .NET SDK 6.0.300.
174         Default value: false.  Available only for C#.
175
176          *   *   *   *   *
177
178   classlib
179-f|--framework <FRAMEWORK>
180
181         Specifies the framework to target.  Values: net7.0, net6.0,  or  net‐
182         coreapp3.1  to  create a .NET Class Library or netstandard2.1 or net‐
183         standard2.0 to create a .NET Standard  Class  Library.   The  default
184         value for .NET SDK 7.0.x is net7.0.
185
186         To  create  a  project  that targets a framework earlier than the SDK
187         that you’re using, see --framework for console  projects  earlier  in
188         this article.
189
190--langVersion <VERSION_NUMBER>
191
192         Sets the LangVersion property in the created project file.  For exam‐
193         ple, use --langVersion 7.3 to use C#  7.3.   Not  supported  for  F#.
194         Available since .NET Core 2.2 SDK.
195
196         For a list of default C# versions, see Defaults.
197
198--no-restore
199
200         Doesn’t execute an implicit restore during project creation.
201
202          *   *   *   *   *
203
204   wpf, wpflib, wpfcustomcontrollib, wpfusercontrollib
205-f|--framework <FRAMEWORK>
206
207         Specifies  the  framework to target.  For the .NET 6 SDK, the default
208         value is net6.0.  Available since .NET Core 3.1 SDK.
209
210--langVersion <VERSION_NUMBER>
211
212         Sets the LangVersion property in the created project file.  For exam‐
213         ple, use --langVersion 7.3 to use C# 7.3.
214
215         For a list of default C# versions, see Defaults.
216
217--no-restore
218
219         Doesn’t execute an implicit restore during project creation.
220
221          *   *   *   *   *
222
223   winforms, winformslib
224--langVersion <VERSION_NUMBER>
225
226         Sets the LangVersion property in the created project file.  For exam‐
227         ple, use --langVersion 7.3 to use C# 7.3.
228
229         For a list of default C# versions, see Defaults.
230
231--no-restore
232
233         Doesn’t execute an implicit restore during project creation.
234
235          *   *   *   *   *
236
237   worker, grpc
238-f|--framework <FRAMEWORK>
239
240         Specifies the framework to target.  The default value for .NET 7  SDK
241         is net7.0.  Available since .NET Core 3.1 SDK.
242
243         To  create  a  project  that targets a framework earlier than the SDK
244         that you’re using, see --framework for console  projects  earlier  in
245         this article.
246
247--exclude-launch-settings
248
249         Excludes launchSettings.json from the generated template.
250
251--no-restore
252
253         Doesn’t execute an implicit restore during project creation.
254
255--use-program-main
256
257         If  specified, an explicit Program class and Main method will be used
258         instead of top-level statements.  Available since .NET  SDK  6.0.300.
259         Default value: false.
260
261          *   *   *   *   *
262
263   mstest, xunit
264-f|--framework <FRAMEWORK>
265
266         Specifies  the framework to target.  Option available since .NET Core
267         3.0 SDK.
268
269         The following table lists the default values  according  to  the  SDK
270         version number you’re using:
271
272         SDK version   Default value
273         ────────────────────────────
274         6.0           net6.0
275         5.0           net5.0
276         3.1           netcoreapp3.1
277
278       The  ability  to  create a project for an earlier TFM depends on having
279       that version of the SDK installed.  For example, if you have  only  the
280       .NET  6 SDK installed, then the only value available for --framework is
281       net6.0.  If you install the .NET 5 SDK, the value net5.0 becomes avail‐
282       able  for  --framework.  If you install the .NET Core 3.1 SDK, netcore‐
283       app3.1 becomes available, and so on.  So by specifying --framework net‐
284       coreapp3.1  you  can target .NET Core 3.1 even while running dotnet new
285       in the .NET 6 SDK.
286
287-p|--enable-pack
288
289         Enables packaging for the project using dotnet pack.
290
291--no-restore
292
293         Doesn’t execute an implicit restore during project creation.
294
295          *   *   *   *   *
296
297   nunit
298-f|--framework <FRAMEWORK>
299
300         Specifies the framework to target.
301
302         The following table lists the default values  according  to  the  SDK
303         version number you’re using:
304
305         SDK version   Default value
306         ────────────────────────────
307         6.0           net6.0
308         5.0           net5.0
309         3.1           netcoreapp3.1
310
311       The  ability  to  create a project for an earlier TFM depends on having
312       that version of the SDK installed.  For example, if you have  only  the
313       .NET  6 SDK installed, then the only value available for --framework is
314       net6.0.  If you install the .NET 5 SDK, the value net5.0 becomes avail‐
315       able  for  --framework.  If you install the .NET Core 3.1 SDK, netcore‐
316       app3.1 becomes available, and so on.  So by specifying --framework net‐
317       coreapp3.1  you  can target .NET Core 3.1 even while running dotnet new
318       in the .NET 6 SDK.
319
320-p|--enable-pack
321
322         Enables packaging for the project using dotnet pack.
323
324--no-restore
325
326         Doesn’t execute an implicit restore during project creation.
327
328          *   *   *   *   *
329
330   page
331-na|--namespace <NAMESPACE_NAME>
332
333         Namespace for the generated code.  The default value  is  MyApp.Name‐
334         space.
335
336-np|--no-pagemodel
337
338         Creates the page without a PageModel.
339
340          *   *   *   *   *
341
342   viewimports, proto
343-na|--namespace <NAMESPACE_NAME>
344
345         Namespace  for  the generated code.  The default value is MyApp.Name‐
346         space.
347
348          *   *   *   *   *
349
350   blazorserver
351-au|--auth <AUTHENTICATION_TYPE>
352
353         The type of authentication to use.  The possible values are:
354
355None - No authentication (Default).
356
357Individual - Individual authentication.
358
359IndividualB2C - Individual authentication with Azure AD B2C.
360
361SingleOrg - Organizational authentication for a single tenant.
362
363MultiOrg - Organizational authentication for multiple tenants.
364
365Windows - Windows authentication.
366
367--aad-b2c-instance <INSTANCE>
368
369         The Azure Active Directory B2C instance to connect to.  Use with  In‐
370         dividualB2C  authentication.   The default value is https://login.mi
371         crosoftonline.com/tfp/.
372
373-ssp|--susi-policy-id <ID>
374
375         The sign-in and sign-up policy ID for this project.  Use  with  Indi‐
376         vidualB2C authentication.
377
378-rp|--reset-password-policy-id <ID>
379
380         The  reset  password  policy ID for this project.  Use with Individu‐
381         alB2C authentication.
382
383-ep|--edit-profile-policy-id <ID>
384
385         The edit profile policy ID for this project.  Use with  IndividualB2C
386         authentication.
387
388--aad-instance <INSTANCE>
389
390         The  Azure Active Directory instance to connect to.  Use with Single‐
391         Org or MultiOrg authentication.  The  default  value  is  https://lo
392         gin.microsoftonline.com/.
393
394--client-id <ID>
395
396         The  Client  ID for this project.  Use with IndividualB2C, SingleOrg,
397         or    MultiOrg    authentication.     The    default     value     is
398         11111111-1111-1111-11111111111111111.
399
400--domain <DOMAIN>
401
402         The domain for the directory tenant.  Use with SingleOrg or Individu‐
403         alB2C authentication.  The default value is qualified.domain.name.
404
405--tenant-id <ID>
406
407         The TenantId ID of the directory to connect to.  Use  with  SingleOrg
408         authentication.          The         default         value         is
409         22222222-2222-2222-2222-222222222222.
410
411--callback-path <PATH>
412
413         The request path within the application’s base path of  the  redirect
414         URI.   Use  with  SingleOrg or IndividualB2C authentication.  The de‐
415         fault value is /signin-oidc.
416
417-r|--org-read-access
418
419         Allows this application read-access to the directory.   Only  applies
420         to SingleOrg or MultiOrg authentication.
421
422--exclude-launch-settings
423
424         Excludes launchSettings.json from the generated template.
425
426--no-https
427
428         Turns  off  HTTPS.  This option only applies if Individual, Individu‐
429         alB2C, SingleOrg, or MultiOrg aren’t being used for --auth.
430
431-uld|--use-local-db
432
433         Specifies LocalDB should be used instead of SQLite.  Only applies  to
434         Individual or IndividualB2C authentication.
435
436--no-restore
437
438         Doesn’t execute an implicit restore during project creation.
439
440--kestrelHttpPort
441
442         Port number to use for the HTTP endpoint in launchSettings.json.
443
444--kestrelHttpsPort
445
446         Port  number  to  use  for the HTTPS endpoint in launchSettings.json.
447         This option is not applicable when the  parameter  no-https  is  used
448         (but no-https is ignored when an individual or organizational authen‐
449         tication setting is chosen for --auth).
450
451--use-program-main
452
453         If specified, an explicit Program class and Main method will be  used
454         instead  of  top-level statements.  Available since .NET SDK 6.0.300.
455         Default value: false.
456
457          *   *   *   *   *
458
459   blazorwasm
460-f|--framework <FRAMEWORK>
461
462         Specifies the framework to target.
463
464         The following table lists the default values  according  to  the  SDK
465         version number you’re using:
466
467         SDK version   Default value
468         ────────────────────────────
469
470         7.0           net7.0
471         6.0           net6.0
472         5.0           net5.0
473         3.1           netcoreapp3.1
474
475         To  create  a  project  that targets a framework earlier than the SDK
476         that you’re using, see --framework for console  projects  earlier  in
477         this article.
478
479--no-restore
480
481         Doesn’t execute an implicit restore during project creation.
482
483-ho|--hosted
484
485         Includes an ASP.NET Core host for the Blazor WebAssembly app.
486
487-au|--auth <AUTHENTICATION_TYPE>
488
489         The type of authentication to use.  The possible values are:
490
491None - No authentication (Default).
492
493Individual - Individual authentication.
494
495IndividualB2C - Individual authentication with Azure AD B2C.
496
497SingleOrg - Organizational authentication for a single tenant.
498
499--authority <AUTHORITY>
500
501         The  authority of the OIDC provider.  Use with Individual authentica‐
502         tion.  The default value is https://login.microsoftonline.com/.
503
504--aad-b2c-instance <INSTANCE>
505
506         The Azure Active Directory B2C instance to connect to.  Use with  In‐
507         dividualB2C  authentication.   The default value is https://aadB2CIn
508         stance.b2clogin.com/.
509
510-ssp|--susi-policy-id <ID>
511
512         The sign-in and sign-up policy ID for this project.  Use  with  Indi‐
513         vidualB2C authentication.
514
515--aad-instance <INSTANCE>
516
517         The  Azure Active Directory instance to connect to.  Use with Single‐
518         Org authentication.  The default value is  https://login.microsofton
519         line.com/.
520
521--client-id <ID>
522
523         The  Client  ID for this project.  Use with IndividualB2C, SingleOrg,
524         or Individual authentication in standalone  scenarios.   The  default
525         value is 33333333-3333-3333-33333333333333333.
526
527--domain <DOMAIN>
528
529         The domain for the directory tenant.  Use with SingleOrg or Individu‐
530         alB2C authentication.  The default value is qualified.domain.name.
531
532--app-id-uri <URI>
533
534         The App ID Uri for the server API you want to call.  Use with Single‐
535         Org   or   IndividualB2C   authentication.    The  default  value  is
536         api.id.uri.
537
538--api-client-id <ID>
539
540         The Client ID for the API that the server hosts.  Use with  SingleOrg
541         or    IndividualB2C    authentication.     The   default   value   is
542         11111111-1111-1111-11111111111111111.
543
544-s|--default-scope <SCOPE>
545
546         The API scope the client needs to request to provision an access  to‐
547         ken.   Use  with  SingleOrg or IndividualB2C authentication.  The de‐
548         fault value is user_impersonation.
549
550--tenant-id <ID>
551
552         The TenantId ID of the directory to connect to.  Use  with  SingleOrg
553         authentication.          The         default         value         is
554         22222222-2222-2222-2222-222222222222.
555
556-r|--org-read-access
557
558         Allows this application read-access to the directory.   Only  applies
559         to SingleOrg authentication.
560
561--exclude-launch-settings
562
563         Excludes launchSettings.json from the generated template.
564
565-p|--pwa
566
567         produces  a Progressive Web Application (PWA) supporting installation
568         and offline use.
569
570--no-https
571
572         Turns off HTTPS.  This option only applies if  Individual,  Individu‐
573         alB2C, or SingleOrg aren’t being used for --auth.
574
575-uld|--use-local-db
576
577         Specifies  LocalDB should be used instead of SQLite.  Only applies to
578         Individual or IndividualB2C authentication.
579
580--called-api-url <URL>
581
582         URL of the API to call from the web app.  Only applies  to  SingleOrg
583         or  IndividualB2C  authentication without an ASP.NET Core host speci‐
584         fied.  The default value is https://graph.microsoft.com/v1.0/me.
585
586--calls-graph
587
588         Specifies if the web app calls Microsoft Graph.  Only applies to Sin‐
589         gleOrg authentication.
590
591--called-api-scopes <SCOPES>
592
593         Scopes  to request to call the API from the web app.  Only applies to
594         SingleOrg or IndividualB2C authentication  without  an  ASP.NET  Core
595         host specified.  The default is user.read.
596
597--kestrelHttpPort
598
599         Port number to use for the HTTP endpoint in launchSettings.json.
600
601--kestrelHttpsPort
602
603         Port  number  to  use  for the HTTPS endpoint in launchSettings.json.
604         This option is not applicable when the  parameter  no-https  is  used
605         (but no-https is ignored when an individual or organizational authen‐
606         tication setting is chosen for --auth).
607
608--use-program-main
609
610         If specified, an explicit Program class and Main method will be  used
611         instead  of  top-level statements.  Available since .NET SDK 6.0.300.
612         Default value: false.
613
614          *   *   *   *   *
615
616   web
617--exclude-launch-settings
618
619         Excludes launchSettings.json from the generated template.
620
621-f|--framework <FRAMEWORK>
622
623         Specifies the framework to target.  Option not available in .NET Core
624         2.2 SDK.
625
626         The  following  table  lists  the default values according to the SDK
627         version number you’re using:
628
629         SDK version   Default value
630         ────────────────────────────
631         6.0           net6.0
632         5.0           net5.0
633         3.1           netcoreapp3.1
634         3.0           netcoreapp3.0
635         2.1           netcoreapp2.1
636
637         To create a project that targets a framework  earlier  than  the  SDK
638         that  you’re  using,  see --framework for console projects earlier in
639         this article.
640
641--no-restore
642
643         Doesn’t execute an implicit restore during project creation.
644
645--no-https
646
647         Turns off HTTPS.
648
649--kestrelHttpPort
650
651         Port number to use for the HTTP endpoint in launchSettings.json.
652
653--kestrelHttpsPort
654
655         Port number to use for the  HTTPS  endpoint  in  launchSettings.json.
656         This  option  is  not  applicable when the parameter no-https is used
657         (but no-https is ignored when an individual or organizational authen‐
658         tication setting is chosen for --auth).
659
660--use-program-main
661
662         If  specified, an explicit Program class and Main method will be used
663         instead of top-level statements.  Available since .NET  SDK  6.0.300.
664         Default value: false.
665
666          *   *   *   *   *
667
668   mvc, webapp
669-au|--auth <AUTHENTICATION_TYPE>
670
671         The type of authentication to use.  The possible values are:
672
673None - No authentication (Default).
674
675Individual - Individual authentication.
676
677IndividualB2C - Individual authentication with Azure AD B2C.
678
679SingleOrg - Organizational authentication for a single tenant.
680
681MultiOrg - Organizational authentication for multiple tenants.
682
683Windows - Windows authentication.
684
685--aad-b2c-instance <INSTANCE>
686
687         The  Azure Active Directory B2C instance to connect to.  Use with In‐
688         dividualB2C authentication.  The default value  is  https://login.mi
689         crosoftonline.com/tfp/.
690
691-ssp|--susi-policy-id <ID>
692
693         The  sign-in  and sign-up policy ID for this project.  Use with Indi‐
694         vidualB2C authentication.
695
696-rp|--reset-password-policy-id <ID>
697
698         The reset password policy ID for this project.   Use  with  Individu‐
699         alB2C authentication.
700
701-ep|--edit-profile-policy-id <ID>
702
703         The  edit profile policy ID for this project.  Use with IndividualB2C
704         authentication.
705
706--aad-instance <INSTANCE>
707
708         The Azure Active Directory instance to connect to.  Use with  Single‐
709         Org  or  MultiOrg  authentication.   The default value is https://lo
710         gin.microsoftonline.com/.
711
712--client-id <ID>
713
714         The Client ID for this project.  Use with  IndividualB2C,  SingleOrg,
715         or     MultiOrg     authentication.     The    default    value    is
716         11111111-1111-1111-11111111111111111.
717
718--domain <DOMAIN>
719
720         The domain for the directory tenant.  Use with SingleOrg or Individu‐
721         alB2C authentication.  The default value is qualified.domain.name.
722
723--tenant-id <ID>
724
725         The  TenantId  ID of the directory to connect to.  Use with SingleOrg
726         authentication.          The         default         value         is
727         22222222-2222-2222-2222-222222222222.
728
729--callback-path <PATH>
730
731         The  request  path within the application’s base path of the redirect
732         URI.  Use with SingleOrg or IndividualB2C  authentication.   The  de‐
733         fault value is /signin-oidc.
734
735-r|--org-read-access
736
737         Allows  this  application read-access to the directory.  Only applies
738         to SingleOrg or MultiOrg authentication.
739
740--exclude-launch-settings
741
742         Excludes launchSettings.json from the generated template.
743
744--no-https
745
746         Turns off HTTPS.  This option only applies if  Individual,  Individu‐
747         alB2C, SingleOrg, or MultiOrg aren’t being used.
748
749-uld|--use-local-db
750
751         Specifies  LocalDB should be used instead of SQLite.  Only applies to
752         Individual or IndividualB2C authentication.
753
754-f|--framework <FRAMEWORK>
755
756         Specifies the framework to target.  Option available since .NET  Core
757         3.0 SDK.
758
759         The  following  table  lists  the default values according to the SDK
760         version number you’re using:
761
762         SDK version   Default value
763         ────────────────────────────
764         6.0           net6.0
765         5.0           net5.0
766         3.1           netcoreapp3.1
767         3.0           netcoreapp3.0
768
769         To create a project that targets a framework  earlier  than  the  SDK
770         that  you’re  using,  see --framework for console projects earlier in
771         this article.
772
773--no-restore
774
775         Doesn’t execute an implicit restore during project creation.
776
777--use-browserlink
778
779         Includes BrowserLink in the project.  Option not  available  in  .NET
780         Core 2.2 and 3.1 SDK.
781
782-rrc|--razor-runtime-compilation
783
784         Determines if the project is configured to use Razor runtime compila‐
785         tion in Debug builds.  Option available since .NET Core 3.1.201 SDK.
786
787--kestrelHttpPort
788
789         Port number to use for the HTTP endpoint in launchSettings.json.
790
791--kestrelHttpsPort
792
793         Port number to use for the  HTTPS  endpoint  in  launchSettings.json.
794         This  option  is  not  applicable when the parameter no-https is used
795         (but no-https is ignored when an individual or organizational authen‐
796         tication setting is chosen for --auth).
797
798--use-program-main
799
800         If  specified, an explicit Program class and Main method will be used
801         instead of top-level statements.  Available since .NET  SDK  6.0.300.
802         Default value: false.
803
804          *   *   *   *   *
805
806   angular, react
807-au|--auth <AUTHENTICATION_TYPE>
808
809         The  type  of  authentication  to use.  Available since .NET Core 3.0
810         SDK.
811
812         The possible values are:
813
814None - No authentication (Default).
815
816Individual - Individual authentication.
817
818--exclude-launch-settings
819
820         Excludes launchSettings.json from the generated template.
821
822--no-restore
823
824         Doesn’t execute an implicit restore during project creation.
825
826--no-https
827
828         Turns off HTTPS.  This option only applies if authentication is None.
829
830-uld|--use-local-db
831
832         Specifies LocalDB should be used instead of SQLite.  Only applies  to
833         Individual  or  IndividualB2C  authentication.   Available since .NET
834         Core 3.0 SDK.
835
836-f|--framework <FRAMEWORK>
837
838         Specifies the framework to target.  Option not available in .NET Core
839         2.2 SDK.
840
841         The  following  table  lists  the default values according to the SDK
842         version number you’re using:
843
844         SDK version   Default value
845         ────────────────────────────
846         6.0           net6.0
847         5.0           net5.0
848         3.1           netcoreapp3.1
849         3.0           netcoreapp3.0
850         2.1           netcoreapp2.0
851
852         To create a project that targets a framework  earlier  than  the  SDK
853         that  you’re  using,  see --framework for console projects earlier in
854         this article.
855
856--kestrelHttpPort
857
858         Port number to use for the HTTP endpoint in launchSettings.json.
859
860--kestrelHttpsPort
861
862         Port number to use for the  HTTPS  endpoint  in  launchSettings.json.
863         This  option  is  not  applicable when the parameter no-https is used
864         (but no-https is ignored when an individual or organizational authen‐
865         tication setting is chosen for --auth).
866
867--use-program-main
868
869         If  specified, an explicit Program class and Main method will be used
870         instead of top-level statements.  Available since .NET  SDK  6.0.300.
871         Default value: false.
872
873          *   *   *   *   *
874
875   reactredux
876--exclude-launch-settings
877
878         Excludes launchSettings.json from the generated template.
879
880-f|--framework <FRAMEWORK>
881
882         Specifies the framework to target.  Option not available in .NET Core
883         2.2 SDK.
884
885         The following table lists the default values  according  to  the  SDK
886         version number you’re using:
887
888         SDK version   Default value
889         ────────────────────────────
890         6.0           net6.0
891         5.0           net5.0
892         3.1           netcoreapp3.1
893         3.0           netcoreapp3.0
894         2.1           netcoreapp2.0
895
896         To  create  a  project  that targets a framework earlier than the SDK
897         that you’re using, see --framework for console  projects  earlier  in
898         this article.
899
900--no-restore
901
902         Doesn’t execute an implicit restore during project creation.
903
904--no-https
905
906         Turns off HTTPS.
907
908--kestrelHttpPort
909
910         Port number to use for the HTTP endpoint in launchSettings.json.
911
912--kestrelHttpsPort
913
914         Port  number  to  use  for the HTTPS endpoint in launchSettings.json.
915         This option is not applicable when the  parameter  no-https  is  used
916         (but no-https is ignored when an individual or organizational authen‐
917         tication setting is chosen for --auth).
918
919          *   *   *   *   *
920
921   razorclasslib
922--no-restore
923
924         Doesn’t execute an implicit restore during project creation.
925
926-s|--support-pages-and-views
927
928         Supports adding traditional Razor pages and Views in addition to com‐
929         ponents to this library.  Available since .NET Core 3.0 SDK.
930
931          *   *   *   *   *
932
933   webapi
934-au|--auth <AUTHENTICATION_TYPE>
935
936         The type of authentication to use.  The possible values are:
937
938None - No authentication (Default).
939
940IndividualB2C - Individual authentication with Azure AD B2C.
941
942SingleOrg - Organizational authentication for a single tenant.
943
944Windows - Windows authentication.
945
946--aad-b2c-instance <INSTANCE>
947
948         The  Azure Active Directory B2C instance to connect to.  Use with In‐
949         dividualB2C authentication.  The default value  is  https://login.mi
950         crosoftonline.com/tfp/.
951
952-minimal
953
954         Create a project that uses the ASP.NET Core minimal API.
955
956-ssp|--susi-policy-id <ID>
957
958         The  sign-in  and sign-up policy ID for this project.  Use with Indi‐
959         vidualB2C authentication.
960
961--aad-instance <INSTANCE>
962
963         The Azure Active Directory instance to connect to.  Use with  Single‐
964         Org  authentication.  The default value is https://login.microsofton
965         line.com/.
966
967--client-id <ID>
968
969         The Client ID for this project.  Use with IndividualB2C or  SingleOrg
970         authentication.          The         default         value         is
971         11111111-1111-1111-11111111111111111.
972
973--domain <DOMAIN>
974
975         The domain for the directory tenant.  Use with IndividualB2C or  Sin‐
976         gleOrg authentication.  The default value is qualified.domain.name.
977
978--tenant-id <ID>
979
980         The  TenantId  ID of the directory to connect to.  Use with SingleOrg
981         authentication.          The         default         value         is
982         22222222-2222-2222-2222-222222222222.
983
984-r|--org-read-access
985
986         Allows  this  application read-access to the directory.  Only applies
987         to SingleOrg authentication.
988
989--exclude-launch-settings
990
991         Excludes launchSettings.json from the generated template.
992
993--no-https
994
995         Turns off  HTTPS.   app.UseHsts  and  app.UseHttpsRedirection  aren’t
996         added  to  Startup.Configure.   This option only applies if Individu‐
997         alB2C or SingleOrg aren’t being used for authentication.
998
999-uld|--use-local-db
1000
1001         Specifies LocalDB should be used instead of SQLite.  Only applies  to
1002         IndividualB2C authentication.
1003
1004-f|--framework <FRAMEWORK>
1005
1006         Specifies the framework to target.  Option not available in .NET Core
1007         2.2 SDK.
1008
1009         The following table lists the default values  according  to  the  SDK
1010         version number you’re using:
1011
1012         SDK version   Default value
1013         ────────────────────────────
1014         6.0           net6.0
1015         5.0           net5.0
1016         3.1           netcoreapp3.1
1017         3.0           netcoreapp3.0
1018         2.1           netcoreapp2.1
1019
1020         To  create  a  project  that targets a framework earlier than the SDK
1021         that you’re using, see --framework for console  projects  earlier  in
1022         this article.
1023
1024--no-restore
1025
1026         Doesn’t execute an implicit restore during project creation.
1027
1028--use-program-main
1029
1030         If  specified, an explicit Program class and Main method will be used
1031         instead of top-level statements.  Available since .NET  SDK  6.0.300.
1032         Default value: false.
1033
1034          *   *   *   *   *
1035
1036   globaljson
1037--sdk-version <VERSION_NUMBER>
1038
1039         Specifies the version of the .NET SDK to use in the global.json file.
1040
1041   editorconfig
1042       Creates an .editorconfig file for configuring code style preferences.
1043
1044--empty
1045
1046         Creates an empty .editorconfig instead of the defaults for .NET.
1047

SEE ALSO

1049       • dotnet new command
1050
1051       • dotnet new list command
1052
1053       • Custom templates for dotnet new
1054
1055       • Create a custom template for dotnet new
1056
1057       • Implicit using directives
1058
1059
1060
1061                                  2022-11-08       dotnet-new-sdk-templates(7)
Impressum