|
6 | 6 | dotnet new console [options] [template options] |
7 | 7 |
|
8 | 8 | Options: |
9 | | - -n, --name <name> The name for the output being created. If no name is specified, the name of the output |
10 | | - directory is used. |
| 9 | + -n, --name <name> The name for the output being created. If no name is specified, the name of the output directory is used. |
11 | 10 | -o, --output <output> Location to place the generated output. |
12 | | - --dry-run Displays a summary of what would happen if the given command line were run if it would result |
13 | | - in a template creation. [default: False] |
| 11 | + --dry-run Displays a summary of what would happen if the given command line were run if it would result in a template creation. [default: False] |
14 | 12 | --force Forces content to be generated even if it would change existing files. [default: False] |
15 | | - --no-update-check Disables checking for the template package updates when instantiating a template. [default: |
16 | | - False] |
| 13 | + --no-update-check Disables checking for the template package updates when instantiating a template. [default: False] |
17 | 14 | --project <project> The project that should be used for context evaluation. |
18 | 15 | -lang, --language <C#> Specifies the template language to instantiate. |
19 | 16 | --type <project> Specifies the template type to instantiate. |
20 | 17 |
|
21 | 18 | Template options: |
22 | | - -f, --framework <net10.0|net9.0|...> The target framework for the project. |
23 | | - Type: choice |
24 | | - net10.0 Target net10.0 |
25 | | - net9.0 Target net9.0 |
26 | | - net8.0 Target net8.0 |
27 | | - net7.0 Target net7.0 |
28 | | - net6.0 Target net6.0 |
29 | | - Default: net10.0 |
30 | | - --langVersion <langVersion> Sets the LangVersion property in the created project file |
31 | | - Type: text |
32 | | - --no-restore If specified, skips the automatic restore of the project on create. |
33 | | - Type: bool |
34 | | - Default: false |
35 | | - --use-program-main Whether to generate an explicit Program class and Main method instead of |
36 | | - top-level statements. |
37 | | - Type: bool |
38 | | - Default: false |
39 | | - --aot Whether to enable the project for publishing as native AOT. |
40 | | - Type: bool |
41 | | - Default: false |
| 19 | + -f, --framework <net10.0|net6.0|net7.0|net8.0|net9.0> The target framework for the project. |
| 20 | + Type: choice |
| 21 | + net10.0 Target net10.0 |
| 22 | + net9.0 Target net9.0 |
| 23 | + net8.0 Target net8.0 |
| 24 | + net7.0 Target net7.0 |
| 25 | + net6.0 Target net6.0 |
| 26 | + Default: net10.0 |
| 27 | + --langVersion <langVersion> Sets the LangVersion property in the created project file |
| 28 | + Type: text |
| 29 | + --no-restore If specified, skips the automatic restore of the project on create. |
| 30 | + Type: bool |
| 31 | + Default: false |
| 32 | + --use-program-main Whether to generate an explicit Program class and Main method instead of top-level statements. |
| 33 | + Type: bool |
| 34 | + Default: false |
| 35 | + --aot Whether to enable the project for publishing as native AOT. |
| 36 | + Type: bool |
| 37 | + Default: false |
42 | 38 |
|
43 | 39 | To see help for other template languages (F#, VB), use --language option: |
44 | 40 | dotnet new console -h --language F# |
0 commit comments