new - Create from Ardalis Templates
The new command is a thin wrapper around dotnet new that forwards all arguments to the .NET CLI template engine. It is intended for use with Ardalis project templates. When called with no arguments it displays usage information.
Note: This command only works with templates that have already been installed via
dotnet new install. It does not install templates itself.
nmbl new <template-short-name> [options]
template-short-name- The short name of an installeddotnet newtemplate (e.g.,clean-arch).
All options are forwarded verbatim to dotnet new. Common options include:
-o,--output <path>- Location to place the generated output.-n,--name <name>- Name for the output being created.--dry-run- Display a summary of what would happen without creating any files.--force- Force content generation even if it changes existing files.
Any other valid dotnet new option for the chosen template is also accepted.
0- Thedotnet newprocess exited successfully, or no arguments were supplied (usage display).1- Thedotnetprocess could not be started or an unexpected error occurred.- Other — The exit code returned by
dotnet newis passed through unchanged.
nmbl new
# Install the template first
dotnet new install Ardalis.CleanArchitecture.Template
# Scaffold a new solution
nmbl new clean-arch -o MyProject
nmbl new clean-arch -o MyProject -n MyApp
nmbl new clean-arch --dry-run
nmbl new clean-arch -o MyProject --force
Templates must be installed before use:
dotnet new install Ardalis.CleanArchitecture.Template
To list all currently installed templates:
dotnet new list
- Use
dotnet slnto manage solution files after scaffolding. - Use
dotnet add referenceto wire up project references.