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-restore

Parameters & Attributes

NameTypeDescription
--namestringProject name
--outputpathFresh output directory
--frameworkTFMTarget framework selected for the template
--no-restoreflagSkip implicit dependency restore

Working Example

Example Snippetcsharp
dotnet new console --name ShelfCounter --output ShelfCounter --framework net10.0 --no-restore
C# & .NET Reference