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

.NET default templates for dotnet new

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