CLI
dotnet new console
Creates a starter console project using an installed SDK template. This form skips implicit restore. Use a fresh directory, a supported TFM, and an approved SDK; never overwrite existing work by default.
Formal Syntax & Structure
csharp syntaxcsharp
dotnet new console --name <NAME> --output <DIRECTORY> --framework <TFM> --no-restoreParameters & Attributes
| Name | Type | Description |
|---|---|---|
| --name | string | Project name |
| --output | path | Fresh output directory |
| --framework | TFM | Target framework selected for the template |
| --no-restore | flag | Skip implicit dependency restore |
Working Example
Example Snippetcsharp
dotnet new console --name ShelfCounter --output ShelfCounter --framework net10.0 --no-restore