|
1 | 1 | Console App (C#) |
2 | 2 | Author: Microsoft |
3 | | -Description: A project for creating a command-line application that can run on .NET on Windows, Linux and macOS |
| 3 | +Description: A project for creating an empty command-line application that can run on .NET on Windows, Linux and macOS |
4 | 4 |
|
5 | 5 | Usage: |
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 directory is used. |
| 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. |
10 | 11 | -o, --output <output> Location to place the generated output. |
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] |
| 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] |
12 | 14 | --force Forces content to be generated even if it would change existing files. [default: False] |
13 | | - --no-update-check Disables checking for the template package updates when instantiating a template. [default: False] |
| 15 | + --no-update-check Disables checking for the template package updates when instantiating a template. [default: |
| 16 | + False] |
14 | 17 | --project <project> The project that should be used for context evaluation. |
15 | 18 | -lang, --language <C#> Specifies the template language to instantiate. |
16 | 19 | --type <project> Specifies the template type to instantiate. |
17 | 20 |
|
18 | 21 | Template options: |
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 |
| 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 |
38 | 42 |
|
39 | 43 | To see help for other template languages (F#, VB), use --language option: |
40 | 44 | dotnet new console -h --language F# |
0 commit comments