Template Comparison
This skill helps an agent compare 2+ dotnet new templates side by side so the user can
pick the right one. It inspects each template's parameters and feature support and renders
a comparison table.
When to Use
- User is deciding between similar templates (e.g.,
webapi vs webapp, blazor vs blazorwasm)
- User asks "which template should I use for X?"
- User wants to understand how two or more templates differ before creating a project
When Not to Use
- User wants to create a project — route to
template-instantiation
- User wants to author or validate a custom template — route to
template-authoring or template-validation
- User just needs to find or inspect a single template — route to
template-discovery
Inputs
| Input |
Required |
Description |
| Template short names |
Yes |
Two or more template short names to compare (e.g., webapi, webapp) |
| Comparison focus |
No |
Optional aspect to emphasize (auth, AOT, frameworks, interactivity) |
Workflow
Step 1: Inspect each template
Run dotnet new <template> --help for each template being compared to collect its
parameters (names, types, defaults, choices) and supported frameworks:
dotnet new webapi --help
dotnet new webapp --help
If a template is not installed, find and install it first (dotnet new search <keyword>,
then dotnet new install <package>).
Run --help calls sequentially. The template engine uses a global mutex, so running
several dotnet new <template> --help commands concurrently can fail with a transient
"mutex"/"persistence" error and empty output. Inspect templates one at a time; if a call
fails, retry it once before moving on, and still produce the comparison from whatever
parameter knowledge you have rather than ending with no answer.
Step 2: Build the comparison table
Produce a side-by-side table covering:
- Parameters — name, type, default, choices
- Feature support — auth, AOT, Docker, controllers, interactivity
- Available frameworks — e.g., net8.0, net9.0, net10.0
- Classifications — categories the template advertises (Web, API, Blazor, etc.)
Example shape:
| Aspect |
webapi |
webapp |
Auth (--auth) |
None, Individual, SingleOrg, Windows |
None, Individual, SingleOrg, ... |
AOT (--aot flag) |
n/a — native AOT via publish-time PublishAot |
n/a |
Controllers (--use-controllers) |
Yes |
n/a |
| Interactivity |
n/a |
n/a |
| Frameworks |
net8.0 / net9.0 / net10.0 |
net8.0 / net9.0 / net10.0 |
| Classifications |
Web, WebAPI |
Web, Razor Pages |
Step 3: Recommend
Summarize the key differences and recommend a template for the user's stated scenario,
linking to template-instantiation to create it.
Validation
Common Pitfalls
| Pitfall |
Solution |
| Comparing uninstalled templates from memory |
Install and inspect each template so the comparison reflects the real parameters and choices. |
| Assuming feature parity |
Parameter names and feature support vary by template — confirm each with --help. |
| Comparing fundamentally different template types |
Only compare templates that solve overlapping problems; note when they target different scenarios. |
More Info
1---2name: template-comparison3description: >4 Compares two or more dotnet new templates side by side to help users choose between5 them based on parameters, feature support, frameworks, and classifications.6 USE FOR: deciding between similar templates (webapi vs webapp, blazor vs7 blazorwasm, console vs worker), producing a side-by-side comparison of parameters and8 feature support, understanding how templates differ before creating a project.9 DO NOT USE FOR: creating a project from a template (use template-instantiation),10 authoring or validating custom templates (use template-authoring and template-validation),11 general single-template discovery (use template-discovery).12license: MIT13metadata:14 source: https://skillmd.com/skills/dotnet/template-comparison15---1617# Template Comparison1819This skill helps an agent compare 2+ `dotnet new` templates side by side so the user can20pick the right one. It inspects each template's parameters and feature support and renders21a comparison table.2223## When to Use2425- User is deciding between similar templates (e.g., `webapi` vs `webapp`, `blazor` vs `blazorwasm`)26- User asks "which template should I use for X?"27- User wants to understand how two or more templates differ before creating a project2829## When Not to Use3031- User wants to create a project — route to `template-instantiation`32- User wants to author or validate a custom template — route to `template-authoring` or `template-validation`33- User just needs to find or inspect a single template — route to `template-discovery`3435## Inputs3637| Input | Required | Description |38|-------|----------|-------------|39| Template short names | Yes | Two or more template short names to compare (e.g., `webapi`, `webapp`) |40| Comparison focus | No | Optional aspect to emphasize (auth, AOT, frameworks, interactivity) |4142## Workflow4344### Step 1: Inspect each template4546Run `dotnet new <template> --help` for each template being compared to collect its47parameters (names, types, defaults, choices) and supported frameworks:4849```bash50dotnet new webapi --help51dotnet new webapp --help52```5354If a template is not installed, find and install it first (`dotnet new search <keyword>`,55then `dotnet new install <package>`).5657> **Run `--help` calls sequentially.** The template engine uses a global mutex, so running58> several `dotnet new <template> --help` commands concurrently can fail with a transient59> "mutex"/"persistence" error and empty output. Inspect templates one at a time; if a call60> fails, retry it once before moving on, and still produce the comparison from whatever61> parameter knowledge you have rather than ending with no answer.6263### Step 2: Build the comparison table6465Produce a side-by-side table covering:6667- **Parameters** — name, type, default, choices68- **Feature support** — auth, AOT, Docker, controllers, interactivity69- **Available frameworks** — e.g., net8.0, net9.0, net10.070- **Classifications** — categories the template advertises (Web, API, Blazor, etc.)7172Example shape:7374| Aspect | `webapi` | `webapp` |75|--------|----------|----------|76| Auth (`--auth`) | None, Individual, SingleOrg, Windows | None, Individual, SingleOrg, ... |77| AOT (`--aot` flag) | n/a — native AOT via publish-time `PublishAot` | n/a |78| Controllers (`--use-controllers`) | Yes | n/a |79| Interactivity | n/a | n/a |80| Frameworks | net8.0 / net9.0 / net10.0 | net8.0 / net9.0 / net10.0 |81| Classifications | Web, WebAPI | Web, Razor Pages |8283### Step 3: Recommend8485Summarize the key differences and recommend a template for the user's stated scenario,86linking to `template-instantiation` to create it.8788## Validation8990- [ ] Every template requested was inspected via `dotnet new <template> --help`91- [ ] The comparison covers parameters, feature support, frameworks, and classifications92- [ ] Differences relevant to the user's scenario are called out explicitly93- [ ] A recommendation (or clear trade-off) is provided9495## Common Pitfalls9697| Pitfall | Solution |98|---------|----------|99| Comparing uninstalled templates from memory | Install and inspect each template so the comparison reflects the real parameters and choices. |100| Assuming feature parity | Parameter names and feature support vary by template — confirm each with `--help`. |101| Comparing fundamentally different template types | Only compare templates that solve overlapping problems; note when they target different scenarios. |102103## More Info104105- [dotnet new templates](https://learn.microsoft.com/dotnet/core/tools/dotnet-new-sdk-templates) — built-in template reference106- [dotnet new](https://learn.microsoft.com/dotnet/core/tools/dotnet-new) — CLI reference