.NET › .NET CLI, SDK & Project Structure (csproj)
What does `dotnet new` do, and how do you list available project templates?
BeginnerAnswer
`dotnet new <template>` scaffolds a new project or file from a built-in or installed template (like webapi, console, classlib, mvc, blazorwasm). `dotnet new list` shows all available templates, including ones installed from third-party template packages via `dotnet new install`.
dotnet new list
dotnet new webapi -n MyApi --use-controllers
dotnet new gitignoreReal-world example A team creates a custom internal template package with `dotnet new install` so every new microservice starts from a pre-configured template with logging, health checks, and standard middleware already wired up.