Skip to content

.NET CLI

List Available Templates

Lists available templates.

dotnet new --list

New

Creates a new project, configuration file or solution based on the specified template.

dotnet new <TEMPLATE>

Add Package

Adds or updates a package reference in a project file.

dotnet add package <PackageName>

Format

Formats code to match editorconfig settings. Requests the Microsoft.CodeAnalysis package added to the project.

dotnet format

Last update: August 11, 2023
Created: June 3, 2023