[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-dotnet-template-instantiation":3,"mdc--xgp8p8-key":34,"related-repo-dotnet-template-instantiation":1546,"related-org-dotnet-template-instantiation":1654},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":26,"topics":27,"repo":29,"sourceUrl":32,"mdContent":33},"template-instantiation","scaffold .NET projects from templates","Creates .NET projects from templates with validated parameters, smart defaults, Central Package Management adaptation, and latest NuGet version resolution. USE FOR: creating new dotnet projects, scaffolding solutions with multiple projects, installing or uninstalling template packages, creating projects that respect Directory.Packages.props (CPM), composing multi-project solutions (API + tests + library), getting latest NuGet package versions in newly created projects. DO NOT USE FOR: finding templates (use template-discovery), producing a detailed side-by-side comparison of templates (use template-comparison), authoring custom templates (use template-authoring), deciding cross-parameter defaults such as which framework to pair with native AOT or whether to keep HTTPS when auth is enabled (use template-smart-defaults), modifying existing projects or adding NuGet packages to existing projects.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"dotnet",".NET (Microsoft)","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fdotnet.png",[12,16,19],{"name":13,"slug":14,"type":15},"Build","build","tag",{"name":17,"slug":18,"type":15},".NET","net",{"name":20,"slug":21,"type":15},"Templates","templates",4576,"https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fskills","2026-07-22T05:35:46.673811","MIT",332,[28],"agent-skills",{"repoUrl":23,"stars":22,"forks":26,"topics":30,"description":31},[28],"Repository for skills to assist AI coding agents with .NET and C#","https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fskills\u002Ftree\u002FHEAD\u002Fplugins\u002Fdotnet-template-engine\u002Fskills\u002Ftemplate-instantiation","---\nname: template-instantiation\ndescription: >\n  Creates .NET projects from templates with validated parameters, smart defaults,\n  Central Package Management adaptation, and latest NuGet version resolution.\n  USE FOR: creating new dotnet projects, scaffolding solutions with multiple projects,\n  installing or uninstalling template packages, creating projects that respect\n  Directory.Packages.props (CPM), composing multi-project solutions (API + tests + library),\n  getting latest NuGet package versions in newly created projects.\n  DO NOT USE FOR: finding templates (use template-discovery), producing a detailed\n  side-by-side comparison of templates (use template-comparison), authoring custom\n  templates (use template-authoring), deciding\n  cross-parameter defaults such as which framework to pair with native AOT or whether to\n  keep HTTPS when auth is enabled (use template-smart-defaults), modifying existing\n  projects or adding NuGet packages to existing projects.\nlicense: MIT\n---\n\n# Template Instantiation\n\nThis skill creates .NET projects from templates using `dotnet new` CLI commands, with guidance for parameter validation, Central Package Management adaptation, and multi-project composition.\n\n> **Match the workspace, then stop.** The highest-value move is aligning the new project with the repo it lands in: detect **CPM** (`Directory.Packages.props`) and the **target framework** used by neighbouring `.csproj` files, and mirror both. **Treat the discovered target framework as an explicit choice** — pass it as `--framework` so `template-smart-defaults` won't override it; deviate only when it's incompatible with a requested feature (then flag the conflict). Do this in as few steps as possible — a `--dry-run`, the create, and one `dotnet build` to confirm is usually enough. Extra exploratory turns add cost without improving the result.\n\n## When to Use\n\n- User asks to create a new .NET project, app, or service\n- User needs a solution with multiple projects (API + tests + library)\n- User wants to create a project that respects existing `Directory.Packages.props`\n- User needs to install or manage template packages\n\n## When Not to Use\n\n- User is searching for templates — route to `template-discovery` skill; for a detailed side-by-side comparison — route to `template-comparison` skill\n- User wants to author a custom template — route to `template-authoring` skill\n- User wants to add packages to an existing project — use `dotnet add package` directly\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Template name or intent | Yes | Template short name (e.g., `webapi`) or natural-language description |\n| Project name | Yes | Name for the created project |\n| Output path | Recommended | Directory where the project should be created |\n| Parameters | No | Template-specific parameters (e.g., `--framework`, `--auth`, `--aot`) |\n\n## Workflow\n\n### Step 1: Resolve template and parameters\n\nIf the user provides a natural-language description, map it to a template short name (see the keyword table in the `template-discovery` skill). If they provide a template name, proceed directly.\n\nUse `dotnet new \u003Ctemplate> --help` to review available parameters, defaults, and types for any parameters the user did not specify.\n\nWhen a parameter the user chose implies a value for an unset *related* parameter, **invoke the `template-smart-defaults` skill** to resolve the gap before assembling the command line — e.g., native AOT implies a recent AOT-capable target framework, a non-`None` `--auth` choice means HTTPS must stay enabled (don't add `--no-https`), and `--use-controllers` excludes the minimal-API option. Smart defaults only fill gaps; never let them override a value the user set explicitly. The workspace framework discovered in Step 2 counts as such an explicit value — pass it to smart-defaults as the chosen `--framework` so it isn't treated as an unset gap; deviate only if it is incompatible with the requested feature\u002Ftemplate (then surface the conflict to the user).\n\n### Step 2: Analyze the workspace\n\nCheck the existing solution structure before creating:\n- Is Central Package Management (CPM) enabled? Look for `Directory.Packages.props`\n- What target frameworks are in use? Check existing `.csproj` files\n- Is there a `global.json` pinning the SDK?\n\nThis ensures the new project is consistent with the workspace.\n\n### Step 3: Preview the creation\n\nUse `dotnet new \u003Ctemplate> --dry-run` to show the user what files would be created. Confirm before proceeding.\n\n```bash\ndotnet new webapi --name MyApi --framework net10.0 --dry-run\n```\n\n### Step 4: Create the project\n\nUse `dotnet new` with the template name and all parameters:\n\n```bash\ndotnet new webapi --name MyApi --output .\u002Fsrc\u002FMyApi --framework net10.0 --auth Individual\n```\n\n#### Common parameter combinations\n\n| Template | Parameters | Example |\n|----------|-----------|---------|\n| `webapi` | `--auth` (None, Individual, SingleOrg, Windows), `--aot` (native AOT) | `dotnet new webapi -n MyApi --auth Individual --aot` |\n| `webapi` | `--use-controllers` (use controllers vs minimal APIs) | `dotnet new webapi -n MyApi --use-controllers` |\n| `blazor` | `--interactivity` (None, Server, WebAssembly, Auto), `--auth` | `dotnet new blazor -n MyApp --interactivity Server` |\n| `grpc` | `--aot` (native AOT) | `dotnet new grpc -n MyService --aot` |\n| `worker` | `--aot` (native AOT) | `dotnet new worker -n MyWorker --aot` |\n\nNote: Use `dotnet new \u003Ctemplate> --help` to see all available parameters for any template.\n\nAfter creation, adapt the project to Central Package Management and refresh stale versions:\n\n1. **Detect CPM** — walk up the directory tree from the new project looking for a `Directory.Packages.props`.\n2. **Strip inline versions** — if found, for each `\u003CPackageReference Include=\"X\" Version=\"Y\" \u002F>` the template generated, remove the `Version` attribute from the `.csproj` (leaving `\u003CPackageReference Include=\"X\" \u002F>`).\n3. **Centralize the version** — add or merge a `\u003CPackageVersion Include=\"X\" Version=\"Y\" \u002F>` entry in `Directory.Packages.props`.\n4. **Optionally refresh stale template-default versions** — templates often hardcode old versions. Keep the template's versions by default (safest for reproducibility and controlled upgrades). Only refresh when the user asks, and when you do:\n   - Prefer a tooling-driven flow: run `dotnet list package --outdated` and confirm the proposed bumps with the user before changing anything.\n   - Constrain upgrades to the same **major** (or major\u002Fminor) version unless the user explicitly opts into larger upgrades, since cross-major bumps can introduce breaking changes.\n   - When checking the latest **stable** version of a package conceptually, the NuGet V3 flat-container `index.json` endpoint for that package ID lists published versions; never select a prerelease unless requested.\n5. **Build** — run `dotnet build` to confirm the centralized\u002Frefreshed versions resolve.\n\n### Step 5: Multi-project composition (optional)\n\nFor complex structures, create each project sequentially and wire them together:\n\n```bash\ndotnet new webapi --name MyApi --output .\u002Fsrc\u002FMyApi\ndotnet new xunit --name MyApi.Tests --output .\u002Ftests\u002FMyApi.Tests\ndotnet add .\u002Ftests\u002FMyApi.Tests reference .\u002Fsrc\u002FMyApi\ndotnet sln add .\u002Fsrc\u002FMyApi .\u002Ftests\u002FMyApi.Tests\n```\n\n### Step 6: Template package management\n\nInstall or uninstall template packages:\n\n```bash\ndotnet new install Microsoft.DotNet.Web.ProjectTemplates.10.0\ndotnet new uninstall Microsoft.DotNet.Web.ProjectTemplates.10.0\n```\n\n### Step 7: Post-creation verification\n\n1. Verify the project builds: `dotnet build`\n2. If added to a solution, verify `dotnet build` at the solution level\n3. If CPM was adapted, verify `Directory.Packages.props` has the new entries\n\n## Validation\n\n- [ ] Project was created successfully with the expected files\n- [ ] Project builds cleanly with `dotnet build`\n- [ ] If CPM is active, `.csproj` has no version attributes and `Directory.Packages.props` has matching entries\n- [ ] Package versions in the project are current (not stale template defaults)\n- [ ] If multi-project, all projects build and reference each other correctly\n\n## Common Pitfalls\n\n| Pitfall | Solution |\n|---------|----------|\n| Not checking for CPM before creating a project | If `Directory.Packages.props` exists, `dotnet new` creates projects with inline versions that conflict. After creation, move versions to `Directory.Packages.props` and remove them from `.csproj`. |\n| Creating projects without specifying the framework | Always specify `--framework` when the template supports multiple TFMs to avoid defaulting to an older version. |\n| Not adding the project to the solution | After creation, run `dotnet sln add` to include the project in the solution. |\n| Not verifying the project builds | Always run `dotnet build` after creation to catch missing dependencies or parameter issues early. |\n\n## More Info\n\n- [Central Package Management](https:\u002F\u002Flearn.microsoft.com\u002Fnuget\u002Fconsume-packages\u002Fcentral-package-management) — CPM documentation\n- [dotnet new](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fcore\u002Ftools\u002Fdotnet-new) — CLI reference\n",{"data":35,"body":36},{"name":4,"description":6,"license":25},{"type":37,"children":38},"root",[39,47,62,146,153,183,189,238,244,378,384,391,403,416,480,486,491,529,534,540,552,610,616,627,685,692,882,894,899,1059,1065,1070,1196,1202,1207,1255,1261,1298,1304,1377,1383,1506,1512,1540],{"type":40,"tag":41,"props":42,"children":43},"element","h1",{"id":4},[44],{"type":45,"value":46},"text","Template Instantiation",{"type":40,"tag":48,"props":49,"children":50},"p",{},[51,53,60],{"type":45,"value":52},"This skill creates .NET projects from templates using ",{"type":40,"tag":54,"props":55,"children":57},"code",{"className":56},[],[58],{"type":45,"value":59},"dotnet new",{"type":45,"value":61}," CLI commands, with guidance for parameter validation, Central Package Management adaptation, and multi-project composition.",{"type":40,"tag":63,"props":64,"children":65},"blockquote",{},[66],{"type":40,"tag":48,"props":67,"children":68},{},[69,75,77,82,84,90,92,97,99,105,107,112,114,120,122,128,130,136,138,144],{"type":40,"tag":70,"props":71,"children":72},"strong",{},[73],{"type":45,"value":74},"Match the workspace, then stop.",{"type":45,"value":76}," The highest-value move is aligning the new project with the repo it lands in: detect ",{"type":40,"tag":70,"props":78,"children":79},{},[80],{"type":45,"value":81},"CPM",{"type":45,"value":83}," (",{"type":40,"tag":54,"props":85,"children":87},{"className":86},[],[88],{"type":45,"value":89},"Directory.Packages.props",{"type":45,"value":91},") and the ",{"type":40,"tag":70,"props":93,"children":94},{},[95],{"type":45,"value":96},"target framework",{"type":45,"value":98}," used by neighbouring ",{"type":40,"tag":54,"props":100,"children":102},{"className":101},[],[103],{"type":45,"value":104},".csproj",{"type":45,"value":106}," files, and mirror both. ",{"type":40,"tag":70,"props":108,"children":109},{},[110],{"type":45,"value":111},"Treat the discovered target framework as an explicit choice",{"type":45,"value":113}," — pass it as ",{"type":40,"tag":54,"props":115,"children":117},{"className":116},[],[118],{"type":45,"value":119},"--framework",{"type":45,"value":121}," so ",{"type":40,"tag":54,"props":123,"children":125},{"className":124},[],[126],{"type":45,"value":127},"template-smart-defaults",{"type":45,"value":129}," won't override it; deviate only when it's incompatible with a requested feature (then flag the conflict). Do this in as few steps as possible — a ",{"type":40,"tag":54,"props":131,"children":133},{"className":132},[],[134],{"type":45,"value":135},"--dry-run",{"type":45,"value":137},", the create, and one ",{"type":40,"tag":54,"props":139,"children":141},{"className":140},[],[142],{"type":45,"value":143},"dotnet build",{"type":45,"value":145}," to confirm is usually enough. Extra exploratory turns add cost without improving the result.",{"type":40,"tag":147,"props":148,"children":150},"h2",{"id":149},"when-to-use",[151],{"type":45,"value":152},"When to Use",{"type":40,"tag":154,"props":155,"children":156},"ul",{},[157,163,168,178],{"type":40,"tag":158,"props":159,"children":160},"li",{},[161],{"type":45,"value":162},"User asks to create a new .NET project, app, or service",{"type":40,"tag":158,"props":164,"children":165},{},[166],{"type":45,"value":167},"User needs a solution with multiple projects (API + tests + library)",{"type":40,"tag":158,"props":169,"children":170},{},[171,173],{"type":45,"value":172},"User wants to create a project that respects existing ",{"type":40,"tag":54,"props":174,"children":176},{"className":175},[],[177],{"type":45,"value":89},{"type":40,"tag":158,"props":179,"children":180},{},[181],{"type":45,"value":182},"User needs to install or manage template packages",{"type":40,"tag":147,"props":184,"children":186},{"id":185},"when-not-to-use",[187],{"type":45,"value":188},"When Not to Use",{"type":40,"tag":154,"props":190,"children":191},{},[192,213,225],{"type":40,"tag":158,"props":193,"children":194},{},[195,197,203,205,211],{"type":45,"value":196},"User is searching for templates — route to ",{"type":40,"tag":54,"props":198,"children":200},{"className":199},[],[201],{"type":45,"value":202},"template-discovery",{"type":45,"value":204}," skill; for a detailed side-by-side comparison — route to ",{"type":40,"tag":54,"props":206,"children":208},{"className":207},[],[209],{"type":45,"value":210},"template-comparison",{"type":45,"value":212}," skill",{"type":40,"tag":158,"props":214,"children":215},{},[216,218,224],{"type":45,"value":217},"User wants to author a custom template — route to ",{"type":40,"tag":54,"props":219,"children":221},{"className":220},[],[222],{"type":45,"value":223},"template-authoring",{"type":45,"value":212},{"type":40,"tag":158,"props":226,"children":227},{},[228,230,236],{"type":45,"value":229},"User wants to add packages to an existing project — use ",{"type":40,"tag":54,"props":231,"children":233},{"className":232},[],[234],{"type":45,"value":235},"dotnet add package",{"type":45,"value":237}," directly",{"type":40,"tag":147,"props":239,"children":241},{"id":240},"inputs",[242],{"type":45,"value":243},"Inputs",{"type":40,"tag":245,"props":246,"children":247},"table",{},[248,272],{"type":40,"tag":249,"props":250,"children":251},"thead",{},[252],{"type":40,"tag":253,"props":254,"children":255},"tr",{},[256,262,267],{"type":40,"tag":257,"props":258,"children":259},"th",{},[260],{"type":45,"value":261},"Input",{"type":40,"tag":257,"props":263,"children":264},{},[265],{"type":45,"value":266},"Required",{"type":40,"tag":257,"props":268,"children":269},{},[270],{"type":45,"value":271},"Description",{"type":40,"tag":273,"props":274,"children":275},"tbody",{},[276,303,320,338],{"type":40,"tag":253,"props":277,"children":278},{},[279,285,290],{"type":40,"tag":280,"props":281,"children":282},"td",{},[283],{"type":45,"value":284},"Template name or intent",{"type":40,"tag":280,"props":286,"children":287},{},[288],{"type":45,"value":289},"Yes",{"type":40,"tag":280,"props":291,"children":292},{},[293,295,301],{"type":45,"value":294},"Template short name (e.g., ",{"type":40,"tag":54,"props":296,"children":298},{"className":297},[],[299],{"type":45,"value":300},"webapi",{"type":45,"value":302},") or natural-language description",{"type":40,"tag":253,"props":304,"children":305},{},[306,311,315],{"type":40,"tag":280,"props":307,"children":308},{},[309],{"type":45,"value":310},"Project name",{"type":40,"tag":280,"props":312,"children":313},{},[314],{"type":45,"value":289},{"type":40,"tag":280,"props":316,"children":317},{},[318],{"type":45,"value":319},"Name for the created project",{"type":40,"tag":253,"props":321,"children":322},{},[323,328,333],{"type":40,"tag":280,"props":324,"children":325},{},[326],{"type":45,"value":327},"Output path",{"type":40,"tag":280,"props":329,"children":330},{},[331],{"type":45,"value":332},"Recommended",{"type":40,"tag":280,"props":334,"children":335},{},[336],{"type":45,"value":337},"Directory where the project should be created",{"type":40,"tag":253,"props":339,"children":340},{},[341,346,351],{"type":40,"tag":280,"props":342,"children":343},{},[344],{"type":45,"value":345},"Parameters",{"type":40,"tag":280,"props":347,"children":348},{},[349],{"type":45,"value":350},"No",{"type":40,"tag":280,"props":352,"children":353},{},[354,356,361,363,369,370,376],{"type":45,"value":355},"Template-specific parameters (e.g., ",{"type":40,"tag":54,"props":357,"children":359},{"className":358},[],[360],{"type":45,"value":119},{"type":45,"value":362},", ",{"type":40,"tag":54,"props":364,"children":366},{"className":365},[],[367],{"type":45,"value":368},"--auth",{"type":45,"value":362},{"type":40,"tag":54,"props":371,"children":373},{"className":372},[],[374],{"type":45,"value":375},"--aot",{"type":45,"value":377},")",{"type":40,"tag":147,"props":379,"children":381},{"id":380},"workflow",[382],{"type":45,"value":383},"Workflow",{"type":40,"tag":385,"props":386,"children":388},"h3",{"id":387},"step-1-resolve-template-and-parameters",[389],{"type":45,"value":390},"Step 1: Resolve template and parameters",{"type":40,"tag":48,"props":392,"children":393},{},[394,396,401],{"type":45,"value":395},"If the user provides a natural-language description, map it to a template short name (see the keyword table in the ",{"type":40,"tag":54,"props":397,"children":399},{"className":398},[],[400],{"type":45,"value":202},{"type":45,"value":402}," skill). If they provide a template name, proceed directly.",{"type":40,"tag":48,"props":404,"children":405},{},[406,408,414],{"type":45,"value":407},"Use ",{"type":40,"tag":54,"props":409,"children":411},{"className":410},[],[412],{"type":45,"value":413},"dotnet new \u003Ctemplate> --help",{"type":45,"value":415}," to review available parameters, defaults, and types for any parameters the user did not specify.",{"type":40,"tag":48,"props":417,"children":418},{},[419,421,427,429,440,442,448,450,455,457,463,465,471,473,478],{"type":45,"value":420},"When a parameter the user chose implies a value for an unset ",{"type":40,"tag":422,"props":423,"children":424},"em",{},[425],{"type":45,"value":426},"related",{"type":45,"value":428}," parameter, ",{"type":40,"tag":70,"props":430,"children":431},{},[432,434,439],{"type":45,"value":433},"invoke the ",{"type":40,"tag":54,"props":435,"children":437},{"className":436},[],[438],{"type":45,"value":127},{"type":45,"value":212},{"type":45,"value":441}," to resolve the gap before assembling the command line — e.g., native AOT implies a recent AOT-capable target framework, a non-",{"type":40,"tag":54,"props":443,"children":445},{"className":444},[],[446],{"type":45,"value":447},"None",{"type":45,"value":449}," ",{"type":40,"tag":54,"props":451,"children":453},{"className":452},[],[454],{"type":45,"value":368},{"type":45,"value":456}," choice means HTTPS must stay enabled (don't add ",{"type":40,"tag":54,"props":458,"children":460},{"className":459},[],[461],{"type":45,"value":462},"--no-https",{"type":45,"value":464},"), and ",{"type":40,"tag":54,"props":466,"children":468},{"className":467},[],[469],{"type":45,"value":470},"--use-controllers",{"type":45,"value":472}," excludes the minimal-API option. Smart defaults only fill gaps; never let them override a value the user set explicitly. The workspace framework discovered in Step 2 counts as such an explicit value — pass it to smart-defaults as the chosen ",{"type":40,"tag":54,"props":474,"children":476},{"className":475},[],[477],{"type":45,"value":119},{"type":45,"value":479}," so it isn't treated as an unset gap; deviate only if it is incompatible with the requested feature\u002Ftemplate (then surface the conflict to the user).",{"type":40,"tag":385,"props":481,"children":483},{"id":482},"step-2-analyze-the-workspace",[484],{"type":45,"value":485},"Step 2: Analyze the workspace",{"type":40,"tag":48,"props":487,"children":488},{},[489],{"type":45,"value":490},"Check the existing solution structure before creating:",{"type":40,"tag":154,"props":492,"children":493},{},[494,504,516],{"type":40,"tag":158,"props":495,"children":496},{},[497,499],{"type":45,"value":498},"Is Central Package Management (CPM) enabled? Look for ",{"type":40,"tag":54,"props":500,"children":502},{"className":501},[],[503],{"type":45,"value":89},{"type":40,"tag":158,"props":505,"children":506},{},[507,509,514],{"type":45,"value":508},"What target frameworks are in use? Check existing ",{"type":40,"tag":54,"props":510,"children":512},{"className":511},[],[513],{"type":45,"value":104},{"type":45,"value":515}," files",{"type":40,"tag":158,"props":517,"children":518},{},[519,521,527],{"type":45,"value":520},"Is there a ",{"type":40,"tag":54,"props":522,"children":524},{"className":523},[],[525],{"type":45,"value":526},"global.json",{"type":45,"value":528}," pinning the SDK?",{"type":40,"tag":48,"props":530,"children":531},{},[532],{"type":45,"value":533},"This ensures the new project is consistent with the workspace.",{"type":40,"tag":385,"props":535,"children":537},{"id":536},"step-3-preview-the-creation",[538],{"type":45,"value":539},"Step 3: Preview the creation",{"type":40,"tag":48,"props":541,"children":542},{},[543,544,550],{"type":45,"value":407},{"type":40,"tag":54,"props":545,"children":547},{"className":546},[],[548],{"type":45,"value":549},"dotnet new \u003Ctemplate> --dry-run",{"type":45,"value":551}," to show the user what files would be created. Confirm before proceeding.",{"type":40,"tag":553,"props":554,"children":559},"pre",{"className":555,"code":556,"language":557,"meta":558,"style":558},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","dotnet new webapi --name MyApi --framework net10.0 --dry-run\n","bash","",[560],{"type":40,"tag":54,"props":561,"children":562},{"__ignoreMap":558},[563],{"type":40,"tag":564,"props":565,"children":568},"span",{"class":566,"line":567},"line",1,[569,574,580,585,590,595,600,605],{"type":40,"tag":564,"props":570,"children":572},{"style":571},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[573],{"type":45,"value":8},{"type":40,"tag":564,"props":575,"children":577},{"style":576},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[578],{"type":45,"value":579}," new",{"type":40,"tag":564,"props":581,"children":582},{"style":576},[583],{"type":45,"value":584}," webapi",{"type":40,"tag":564,"props":586,"children":587},{"style":576},[588],{"type":45,"value":589}," --name",{"type":40,"tag":564,"props":591,"children":592},{"style":576},[593],{"type":45,"value":594}," MyApi",{"type":40,"tag":564,"props":596,"children":597},{"style":576},[598],{"type":45,"value":599}," --framework",{"type":40,"tag":564,"props":601,"children":602},{"style":576},[603],{"type":45,"value":604}," net10.0",{"type":40,"tag":564,"props":606,"children":607},{"style":576},[608],{"type":45,"value":609}," --dry-run\n",{"type":40,"tag":385,"props":611,"children":613},{"id":612},"step-4-create-the-project",[614],{"type":45,"value":615},"Step 4: Create the project",{"type":40,"tag":48,"props":617,"children":618},{},[619,620,625],{"type":45,"value":407},{"type":40,"tag":54,"props":621,"children":623},{"className":622},[],[624],{"type":45,"value":59},{"type":45,"value":626}," with the template name and all parameters:",{"type":40,"tag":553,"props":628,"children":630},{"className":555,"code":629,"language":557,"meta":558,"style":558},"dotnet new webapi --name MyApi --output .\u002Fsrc\u002FMyApi --framework net10.0 --auth Individual\n",[631],{"type":40,"tag":54,"props":632,"children":633},{"__ignoreMap":558},[634],{"type":40,"tag":564,"props":635,"children":636},{"class":566,"line":567},[637,641,645,649,653,657,662,667,671,675,680],{"type":40,"tag":564,"props":638,"children":639},{"style":571},[640],{"type":45,"value":8},{"type":40,"tag":564,"props":642,"children":643},{"style":576},[644],{"type":45,"value":579},{"type":40,"tag":564,"props":646,"children":647},{"style":576},[648],{"type":45,"value":584},{"type":40,"tag":564,"props":650,"children":651},{"style":576},[652],{"type":45,"value":589},{"type":40,"tag":564,"props":654,"children":655},{"style":576},[656],{"type":45,"value":594},{"type":40,"tag":564,"props":658,"children":659},{"style":576},[660],{"type":45,"value":661}," --output",{"type":40,"tag":564,"props":663,"children":664},{"style":576},[665],{"type":45,"value":666}," .\u002Fsrc\u002FMyApi",{"type":40,"tag":564,"props":668,"children":669},{"style":576},[670],{"type":45,"value":599},{"type":40,"tag":564,"props":672,"children":673},{"style":576},[674],{"type":45,"value":604},{"type":40,"tag":564,"props":676,"children":677},{"style":576},[678],{"type":45,"value":679}," --auth",{"type":40,"tag":564,"props":681,"children":682},{"style":576},[683],{"type":45,"value":684}," Individual\n",{"type":40,"tag":686,"props":687,"children":689},"h4",{"id":688},"common-parameter-combinations",[690],{"type":45,"value":691},"Common parameter combinations",{"type":40,"tag":245,"props":693,"children":694},{},[695,715],{"type":40,"tag":249,"props":696,"children":697},{},[698],{"type":40,"tag":253,"props":699,"children":700},{},[701,706,710],{"type":40,"tag":257,"props":702,"children":703},{},[704],{"type":45,"value":705},"Template",{"type":40,"tag":257,"props":707,"children":708},{},[709],{"type":45,"value":345},{"type":40,"tag":257,"props":711,"children":712},{},[713],{"type":45,"value":714},"Example",{"type":40,"tag":273,"props":716,"children":717},{},[718,755,785,822,852],{"type":40,"tag":253,"props":719,"children":720},{},[721,729,746],{"type":40,"tag":280,"props":722,"children":723},{},[724],{"type":40,"tag":54,"props":725,"children":727},{"className":726},[],[728],{"type":45,"value":300},{"type":40,"tag":280,"props":730,"children":731},{},[732,737,739,744],{"type":40,"tag":54,"props":733,"children":735},{"className":734},[],[736],{"type":45,"value":368},{"type":45,"value":738}," (None, Individual, SingleOrg, Windows), ",{"type":40,"tag":54,"props":740,"children":742},{"className":741},[],[743],{"type":45,"value":375},{"type":45,"value":745}," (native AOT)",{"type":40,"tag":280,"props":747,"children":748},{},[749],{"type":40,"tag":54,"props":750,"children":752},{"className":751},[],[753],{"type":45,"value":754},"dotnet new webapi -n MyApi --auth Individual --aot",{"type":40,"tag":253,"props":756,"children":757},{},[758,766,776],{"type":40,"tag":280,"props":759,"children":760},{},[761],{"type":40,"tag":54,"props":762,"children":764},{"className":763},[],[765],{"type":45,"value":300},{"type":40,"tag":280,"props":767,"children":768},{},[769,774],{"type":40,"tag":54,"props":770,"children":772},{"className":771},[],[773],{"type":45,"value":470},{"type":45,"value":775}," (use controllers vs minimal APIs)",{"type":40,"tag":280,"props":777,"children":778},{},[779],{"type":40,"tag":54,"props":780,"children":782},{"className":781},[],[783],{"type":45,"value":784},"dotnet new webapi -n MyApi --use-controllers",{"type":40,"tag":253,"props":786,"children":787},{},[788,797,813],{"type":40,"tag":280,"props":789,"children":790},{},[791],{"type":40,"tag":54,"props":792,"children":794},{"className":793},[],[795],{"type":45,"value":796},"blazor",{"type":40,"tag":280,"props":798,"children":799},{},[800,806,808],{"type":40,"tag":54,"props":801,"children":803},{"className":802},[],[804],{"type":45,"value":805},"--interactivity",{"type":45,"value":807}," (None, Server, WebAssembly, Auto), ",{"type":40,"tag":54,"props":809,"children":811},{"className":810},[],[812],{"type":45,"value":368},{"type":40,"tag":280,"props":814,"children":815},{},[816],{"type":40,"tag":54,"props":817,"children":819},{"className":818},[],[820],{"type":45,"value":821},"dotnet new blazor -n MyApp --interactivity Server",{"type":40,"tag":253,"props":823,"children":824},{},[825,834,843],{"type":40,"tag":280,"props":826,"children":827},{},[828],{"type":40,"tag":54,"props":829,"children":831},{"className":830},[],[832],{"type":45,"value":833},"grpc",{"type":40,"tag":280,"props":835,"children":836},{},[837,842],{"type":40,"tag":54,"props":838,"children":840},{"className":839},[],[841],{"type":45,"value":375},{"type":45,"value":745},{"type":40,"tag":280,"props":844,"children":845},{},[846],{"type":40,"tag":54,"props":847,"children":849},{"className":848},[],[850],{"type":45,"value":851},"dotnet new grpc -n MyService --aot",{"type":40,"tag":253,"props":853,"children":854},{},[855,864,873],{"type":40,"tag":280,"props":856,"children":857},{},[858],{"type":40,"tag":54,"props":859,"children":861},{"className":860},[],[862],{"type":45,"value":863},"worker",{"type":40,"tag":280,"props":865,"children":866},{},[867,872],{"type":40,"tag":54,"props":868,"children":870},{"className":869},[],[871],{"type":45,"value":375},{"type":45,"value":745},{"type":40,"tag":280,"props":874,"children":875},{},[876],{"type":40,"tag":54,"props":877,"children":879},{"className":878},[],[880],{"type":45,"value":881},"dotnet new worker -n MyWorker --aot",{"type":40,"tag":48,"props":883,"children":884},{},[885,887,892],{"type":45,"value":886},"Note: Use ",{"type":40,"tag":54,"props":888,"children":890},{"className":889},[],[891],{"type":45,"value":413},{"type":45,"value":893}," to see all available parameters for any template.",{"type":40,"tag":48,"props":895,"children":896},{},[897],{"type":45,"value":898},"After creation, adapt the project to Central Package Management and refresh stale versions:",{"type":40,"tag":900,"props":901,"children":902},"ol",{},[903,920,961,985,1043],{"type":40,"tag":158,"props":904,"children":905},{},[906,911,913,918],{"type":40,"tag":70,"props":907,"children":908},{},[909],{"type":45,"value":910},"Detect CPM",{"type":45,"value":912}," — walk up the directory tree from the new project looking for a ",{"type":40,"tag":54,"props":914,"children":916},{"className":915},[],[917],{"type":45,"value":89},{"type":45,"value":919},".",{"type":40,"tag":158,"props":921,"children":922},{},[923,928,930,936,938,944,946,951,953,959],{"type":40,"tag":70,"props":924,"children":925},{},[926],{"type":45,"value":927},"Strip inline versions",{"type":45,"value":929}," — if found, for each ",{"type":40,"tag":54,"props":931,"children":933},{"className":932},[],[934],{"type":45,"value":935},"\u003CPackageReference Include=\"X\" Version=\"Y\" \u002F>",{"type":45,"value":937}," the template generated, remove the ",{"type":40,"tag":54,"props":939,"children":941},{"className":940},[],[942],{"type":45,"value":943},"Version",{"type":45,"value":945}," attribute from the ",{"type":40,"tag":54,"props":947,"children":949},{"className":948},[],[950],{"type":45,"value":104},{"type":45,"value":952}," (leaving ",{"type":40,"tag":54,"props":954,"children":956},{"className":955},[],[957],{"type":45,"value":958},"\u003CPackageReference Include=\"X\" \u002F>",{"type":45,"value":960},").",{"type":40,"tag":158,"props":962,"children":963},{},[964,969,971,977,979,984],{"type":40,"tag":70,"props":965,"children":966},{},[967],{"type":45,"value":968},"Centralize the version",{"type":45,"value":970}," — add or merge a ",{"type":40,"tag":54,"props":972,"children":974},{"className":973},[],[975],{"type":45,"value":976},"\u003CPackageVersion Include=\"X\" Version=\"Y\" \u002F>",{"type":45,"value":978}," entry in ",{"type":40,"tag":54,"props":980,"children":982},{"className":981},[],[983],{"type":45,"value":89},{"type":45,"value":919},{"type":40,"tag":158,"props":986,"children":987},{},[988,993,995],{"type":40,"tag":70,"props":989,"children":990},{},[991],{"type":45,"value":992},"Optionally refresh stale template-default versions",{"type":45,"value":994}," — templates often hardcode old versions. Keep the template's versions by default (safest for reproducibility and controlled upgrades). Only refresh when the user asks, and when you do:\n",{"type":40,"tag":154,"props":996,"children":997},{},[998,1011,1023],{"type":40,"tag":158,"props":999,"children":1000},{},[1001,1003,1009],{"type":45,"value":1002},"Prefer a tooling-driven flow: run ",{"type":40,"tag":54,"props":1004,"children":1006},{"className":1005},[],[1007],{"type":45,"value":1008},"dotnet list package --outdated",{"type":45,"value":1010}," and confirm the proposed bumps with the user before changing anything.",{"type":40,"tag":158,"props":1012,"children":1013},{},[1014,1016,1021],{"type":45,"value":1015},"Constrain upgrades to the same ",{"type":40,"tag":70,"props":1017,"children":1018},{},[1019],{"type":45,"value":1020},"major",{"type":45,"value":1022}," (or major\u002Fminor) version unless the user explicitly opts into larger upgrades, since cross-major bumps can introduce breaking changes.",{"type":40,"tag":158,"props":1024,"children":1025},{},[1026,1028,1033,1035,1041],{"type":45,"value":1027},"When checking the latest ",{"type":40,"tag":70,"props":1029,"children":1030},{},[1031],{"type":45,"value":1032},"stable",{"type":45,"value":1034}," version of a package conceptually, the NuGet V3 flat-container ",{"type":40,"tag":54,"props":1036,"children":1038},{"className":1037},[],[1039],{"type":45,"value":1040},"index.json",{"type":45,"value":1042}," endpoint for that package ID lists published versions; never select a prerelease unless requested.",{"type":40,"tag":158,"props":1044,"children":1045},{},[1046,1050,1052,1057],{"type":40,"tag":70,"props":1047,"children":1048},{},[1049],{"type":45,"value":13},{"type":45,"value":1051}," — run ",{"type":40,"tag":54,"props":1053,"children":1055},{"className":1054},[],[1056],{"type":45,"value":143},{"type":45,"value":1058}," to confirm the centralized\u002Frefreshed versions resolve.",{"type":40,"tag":385,"props":1060,"children":1062},{"id":1061},"step-5-multi-project-composition-optional",[1063],{"type":45,"value":1064},"Step 5: Multi-project composition (optional)",{"type":40,"tag":48,"props":1066,"children":1067},{},[1068],{"type":45,"value":1069},"For complex structures, create each project sequentially and wire them together:",{"type":40,"tag":553,"props":1071,"children":1073},{"className":555,"code":1072,"language":557,"meta":558,"style":558},"dotnet new webapi --name MyApi --output .\u002Fsrc\u002FMyApi\ndotnet new xunit --name MyApi.Tests --output .\u002Ftests\u002FMyApi.Tests\ndotnet add .\u002Ftests\u002FMyApi.Tests reference .\u002Fsrc\u002FMyApi\ndotnet sln add .\u002Fsrc\u002FMyApi .\u002Ftests\u002FMyApi.Tests\n",[1074],{"type":40,"tag":54,"props":1075,"children":1076},{"__ignoreMap":558},[1077,1109,1144,1171],{"type":40,"tag":564,"props":1078,"children":1079},{"class":566,"line":567},[1080,1084,1088,1092,1096,1100,1104],{"type":40,"tag":564,"props":1081,"children":1082},{"style":571},[1083],{"type":45,"value":8},{"type":40,"tag":564,"props":1085,"children":1086},{"style":576},[1087],{"type":45,"value":579},{"type":40,"tag":564,"props":1089,"children":1090},{"style":576},[1091],{"type":45,"value":584},{"type":40,"tag":564,"props":1093,"children":1094},{"style":576},[1095],{"type":45,"value":589},{"type":40,"tag":564,"props":1097,"children":1098},{"style":576},[1099],{"type":45,"value":594},{"type":40,"tag":564,"props":1101,"children":1102},{"style":576},[1103],{"type":45,"value":661},{"type":40,"tag":564,"props":1105,"children":1106},{"style":576},[1107],{"type":45,"value":1108}," .\u002Fsrc\u002FMyApi\n",{"type":40,"tag":564,"props":1110,"children":1112},{"class":566,"line":1111},2,[1113,1117,1121,1126,1130,1135,1139],{"type":40,"tag":564,"props":1114,"children":1115},{"style":571},[1116],{"type":45,"value":8},{"type":40,"tag":564,"props":1118,"children":1119},{"style":576},[1120],{"type":45,"value":579},{"type":40,"tag":564,"props":1122,"children":1123},{"style":576},[1124],{"type":45,"value":1125}," xunit",{"type":40,"tag":564,"props":1127,"children":1128},{"style":576},[1129],{"type":45,"value":589},{"type":40,"tag":564,"props":1131,"children":1132},{"style":576},[1133],{"type":45,"value":1134}," MyApi.Tests",{"type":40,"tag":564,"props":1136,"children":1137},{"style":576},[1138],{"type":45,"value":661},{"type":40,"tag":564,"props":1140,"children":1141},{"style":576},[1142],{"type":45,"value":1143}," .\u002Ftests\u002FMyApi.Tests\n",{"type":40,"tag":564,"props":1145,"children":1147},{"class":566,"line":1146},3,[1148,1152,1157,1162,1167],{"type":40,"tag":564,"props":1149,"children":1150},{"style":571},[1151],{"type":45,"value":8},{"type":40,"tag":564,"props":1153,"children":1154},{"style":576},[1155],{"type":45,"value":1156}," add",{"type":40,"tag":564,"props":1158,"children":1159},{"style":576},[1160],{"type":45,"value":1161}," .\u002Ftests\u002FMyApi.Tests",{"type":40,"tag":564,"props":1163,"children":1164},{"style":576},[1165],{"type":45,"value":1166}," reference",{"type":40,"tag":564,"props":1168,"children":1169},{"style":576},[1170],{"type":45,"value":1108},{"type":40,"tag":564,"props":1172,"children":1174},{"class":566,"line":1173},4,[1175,1179,1184,1188,1192],{"type":40,"tag":564,"props":1176,"children":1177},{"style":571},[1178],{"type":45,"value":8},{"type":40,"tag":564,"props":1180,"children":1181},{"style":576},[1182],{"type":45,"value":1183}," sln",{"type":40,"tag":564,"props":1185,"children":1186},{"style":576},[1187],{"type":45,"value":1156},{"type":40,"tag":564,"props":1189,"children":1190},{"style":576},[1191],{"type":45,"value":666},{"type":40,"tag":564,"props":1193,"children":1194},{"style":576},[1195],{"type":45,"value":1143},{"type":40,"tag":385,"props":1197,"children":1199},{"id":1198},"step-6-template-package-management",[1200],{"type":45,"value":1201},"Step 6: Template package management",{"type":40,"tag":48,"props":1203,"children":1204},{},[1205],{"type":45,"value":1206},"Install or uninstall template packages:",{"type":40,"tag":553,"props":1208,"children":1210},{"className":555,"code":1209,"language":557,"meta":558,"style":558},"dotnet new install Microsoft.DotNet.Web.ProjectTemplates.10.0\ndotnet new uninstall Microsoft.DotNet.Web.ProjectTemplates.10.0\n",[1211],{"type":40,"tag":54,"props":1212,"children":1213},{"__ignoreMap":558},[1214,1235],{"type":40,"tag":564,"props":1215,"children":1216},{"class":566,"line":567},[1217,1221,1225,1230],{"type":40,"tag":564,"props":1218,"children":1219},{"style":571},[1220],{"type":45,"value":8},{"type":40,"tag":564,"props":1222,"children":1223},{"style":576},[1224],{"type":45,"value":579},{"type":40,"tag":564,"props":1226,"children":1227},{"style":576},[1228],{"type":45,"value":1229}," install",{"type":40,"tag":564,"props":1231,"children":1232},{"style":576},[1233],{"type":45,"value":1234}," Microsoft.DotNet.Web.ProjectTemplates.10.0\n",{"type":40,"tag":564,"props":1236,"children":1237},{"class":566,"line":1111},[1238,1242,1246,1251],{"type":40,"tag":564,"props":1239,"children":1240},{"style":571},[1241],{"type":45,"value":8},{"type":40,"tag":564,"props":1243,"children":1244},{"style":576},[1245],{"type":45,"value":579},{"type":40,"tag":564,"props":1247,"children":1248},{"style":576},[1249],{"type":45,"value":1250}," uninstall",{"type":40,"tag":564,"props":1252,"children":1253},{"style":576},[1254],{"type":45,"value":1234},{"type":40,"tag":385,"props":1256,"children":1258},{"id":1257},"step-7-post-creation-verification",[1259],{"type":45,"value":1260},"Step 7: Post-creation verification",{"type":40,"tag":900,"props":1262,"children":1263},{},[1264,1274,1286],{"type":40,"tag":158,"props":1265,"children":1266},{},[1267,1269],{"type":45,"value":1268},"Verify the project builds: ",{"type":40,"tag":54,"props":1270,"children":1272},{"className":1271},[],[1273],{"type":45,"value":143},{"type":40,"tag":158,"props":1275,"children":1276},{},[1277,1279,1284],{"type":45,"value":1278},"If added to a solution, verify ",{"type":40,"tag":54,"props":1280,"children":1282},{"className":1281},[],[1283],{"type":45,"value":143},{"type":45,"value":1285}," at the solution level",{"type":40,"tag":158,"props":1287,"children":1288},{},[1289,1291,1296],{"type":45,"value":1290},"If CPM was adapted, verify ",{"type":40,"tag":54,"props":1292,"children":1294},{"className":1293},[],[1295],{"type":45,"value":89},{"type":45,"value":1297}," has the new entries",{"type":40,"tag":147,"props":1299,"children":1301},{"id":1300},"validation",[1302],{"type":45,"value":1303},"Validation",{"type":40,"tag":154,"props":1305,"children":1308},{"className":1306},[1307],"contains-task-list",[1309,1322,1336,1359,1368],{"type":40,"tag":158,"props":1310,"children":1313},{"className":1311},[1312],"task-list-item",[1314,1320],{"type":40,"tag":1315,"props":1316,"children":1319},"input",{"disabled":1317,"type":1318},true,"checkbox",[],{"type":45,"value":1321}," Project was created successfully with the expected files",{"type":40,"tag":158,"props":1323,"children":1325},{"className":1324},[1312],[1326,1329,1331],{"type":40,"tag":1315,"props":1327,"children":1328},{"disabled":1317,"type":1318},[],{"type":45,"value":1330}," Project builds cleanly with ",{"type":40,"tag":54,"props":1332,"children":1334},{"className":1333},[],[1335],{"type":45,"value":143},{"type":40,"tag":158,"props":1337,"children":1339},{"className":1338},[1312],[1340,1343,1345,1350,1352,1357],{"type":40,"tag":1315,"props":1341,"children":1342},{"disabled":1317,"type":1318},[],{"type":45,"value":1344}," If CPM is active, ",{"type":40,"tag":54,"props":1346,"children":1348},{"className":1347},[],[1349],{"type":45,"value":104},{"type":45,"value":1351}," has no version attributes and ",{"type":40,"tag":54,"props":1353,"children":1355},{"className":1354},[],[1356],{"type":45,"value":89},{"type":45,"value":1358}," has matching entries",{"type":40,"tag":158,"props":1360,"children":1362},{"className":1361},[1312],[1363,1366],{"type":40,"tag":1315,"props":1364,"children":1365},{"disabled":1317,"type":1318},[],{"type":45,"value":1367}," Package versions in the project are current (not stale template defaults)",{"type":40,"tag":158,"props":1369,"children":1371},{"className":1370},[1312],[1372,1375],{"type":40,"tag":1315,"props":1373,"children":1374},{"disabled":1317,"type":1318},[],{"type":45,"value":1376}," If multi-project, all projects build and reference each other correctly",{"type":40,"tag":147,"props":1378,"children":1380},{"id":1379},"common-pitfalls",[1381],{"type":45,"value":1382},"Common Pitfalls",{"type":40,"tag":245,"props":1384,"children":1385},{},[1386,1402],{"type":40,"tag":249,"props":1387,"children":1388},{},[1389],{"type":40,"tag":253,"props":1390,"children":1391},{},[1392,1397],{"type":40,"tag":257,"props":1393,"children":1394},{},[1395],{"type":45,"value":1396},"Pitfall",{"type":40,"tag":257,"props":1398,"children":1399},{},[1400],{"type":45,"value":1401},"Solution",{"type":40,"tag":273,"props":1403,"children":1404},{},[1405,1445,1465,1486],{"type":40,"tag":253,"props":1406,"children":1407},{},[1408,1413],{"type":40,"tag":280,"props":1409,"children":1410},{},[1411],{"type":45,"value":1412},"Not checking for CPM before creating a project",{"type":40,"tag":280,"props":1414,"children":1415},{},[1416,1418,1423,1425,1430,1432,1437,1439,1444],{"type":45,"value":1417},"If ",{"type":40,"tag":54,"props":1419,"children":1421},{"className":1420},[],[1422],{"type":45,"value":89},{"type":45,"value":1424}," exists, ",{"type":40,"tag":54,"props":1426,"children":1428},{"className":1427},[],[1429],{"type":45,"value":59},{"type":45,"value":1431}," creates projects with inline versions that conflict. After creation, move versions to ",{"type":40,"tag":54,"props":1433,"children":1435},{"className":1434},[],[1436],{"type":45,"value":89},{"type":45,"value":1438}," and remove them from ",{"type":40,"tag":54,"props":1440,"children":1442},{"className":1441},[],[1443],{"type":45,"value":104},{"type":45,"value":919},{"type":40,"tag":253,"props":1446,"children":1447},{},[1448,1453],{"type":40,"tag":280,"props":1449,"children":1450},{},[1451],{"type":45,"value":1452},"Creating projects without specifying the framework",{"type":40,"tag":280,"props":1454,"children":1455},{},[1456,1458,1463],{"type":45,"value":1457},"Always specify ",{"type":40,"tag":54,"props":1459,"children":1461},{"className":1460},[],[1462],{"type":45,"value":119},{"type":45,"value":1464}," when the template supports multiple TFMs to avoid defaulting to an older version.",{"type":40,"tag":253,"props":1466,"children":1467},{},[1468,1473],{"type":40,"tag":280,"props":1469,"children":1470},{},[1471],{"type":45,"value":1472},"Not adding the project to the solution",{"type":40,"tag":280,"props":1474,"children":1475},{},[1476,1478,1484],{"type":45,"value":1477},"After creation, run ",{"type":40,"tag":54,"props":1479,"children":1481},{"className":1480},[],[1482],{"type":45,"value":1483},"dotnet sln add",{"type":45,"value":1485}," to include the project in the solution.",{"type":40,"tag":253,"props":1487,"children":1488},{},[1489,1494],{"type":40,"tag":280,"props":1490,"children":1491},{},[1492],{"type":45,"value":1493},"Not verifying the project builds",{"type":40,"tag":280,"props":1495,"children":1496},{},[1497,1499,1504],{"type":45,"value":1498},"Always run ",{"type":40,"tag":54,"props":1500,"children":1502},{"className":1501},[],[1503],{"type":45,"value":143},{"type":45,"value":1505}," after creation to catch missing dependencies or parameter issues early.",{"type":40,"tag":147,"props":1507,"children":1509},{"id":1508},"more-info",[1510],{"type":45,"value":1511},"More Info",{"type":40,"tag":154,"props":1513,"children":1514},{},[1515,1529],{"type":40,"tag":158,"props":1516,"children":1517},{},[1518,1527],{"type":40,"tag":1519,"props":1520,"children":1524},"a",{"href":1521,"rel":1522},"https:\u002F\u002Flearn.microsoft.com\u002Fnuget\u002Fconsume-packages\u002Fcentral-package-management",[1523],"nofollow",[1525],{"type":45,"value":1526},"Central Package Management",{"type":45,"value":1528}," — CPM documentation",{"type":40,"tag":158,"props":1530,"children":1531},{},[1532,1538],{"type":40,"tag":1519,"props":1533,"children":1536},{"href":1534,"rel":1535},"https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fcore\u002Ftools\u002Fdotnet-new",[1523],[1537],{"type":45,"value":59},{"type":45,"value":1539}," — CLI reference",{"type":40,"tag":1541,"props":1542,"children":1543},"style",{},[1544],{"type":45,"value":1545},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1547,"total":1653},[1548,1565,1580,1598,1612,1631,1641],{"slug":1549,"name":1549,"fn":1550,"description":1551,"org":1552,"tags":1553,"stars":22,"repoUrl":23,"updatedAt":1564},"analyzing-dotnet-performance","analyze .NET code for performance anti-patterns","Scans .NET code for ~50 performance anti-patterns across async, memory, strings, collections, LINQ, regex, serialization, and I\u002FO with tiered severity classification. Use when analyzing .NET code for optimization opportunities, reviewing hot paths, or auditing allocation-heavy patterns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1554,1555,1558,1561],{"name":17,"slug":18,"type":15},{"name":1556,"slug":1557,"type":15},"Code Analysis","code-analysis",{"name":1559,"slug":1560,"type":15},"Debugging","debugging",{"name":1562,"slug":1563,"type":15},"Performance","performance","2026-07-12T08:23:25.400375",{"slug":1566,"name":1566,"fn":1567,"description":1568,"org":1569,"tags":1570,"stars":22,"repoUrl":23,"updatedAt":1579},"android-tombstone-symbolication","symbolicate .NET runtime frames in Android tombstones","Symbolicate the .NET runtime frames in an Android tombstone file. Extracts BuildIds and PC offsets from the native backtrace, downloads debug symbols from the Microsoft symbol server, and runs llvm-symbolizer to produce function names with source file and line numbers. USE FOR triaging a .NET MAUI or Mono Android app crash from a tombstone, resolving native backtrace frames in libmonosgen-2.0.so or libcoreclr.so to .NET runtime source code, or investigating SIGABRT, SIGSEGV, or other native signals originating from the .NET runtime on Android. DO NOT USE FOR pure Java\u002FKotlin crashes, managed .NET exceptions that are already captured in logcat, or iOS crash logs. INVOKES Symbolicate-Tombstone.ps1 script, llvm-symbolizer, Microsoft symbol server.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1571,1572,1575,1576],{"name":17,"slug":18,"type":15},{"name":1573,"slug":1574,"type":15},"Android","android",{"name":1559,"slug":1560,"type":15},{"name":1577,"slug":1578,"type":15},"Microsoft","microsoft","2026-07-12T08:23:21.595572",{"slug":1581,"name":1581,"fn":1582,"description":1583,"org":1584,"tags":1585,"stars":22,"repoUrl":23,"updatedAt":1597},"apple-crash-symbolication","symbolicate .NET runtime frames in crash logs","Symbolicate .NET runtime frames in Apple platform .ips crash logs (iOS, tvOS, Mac Catalyst, macOS). Extracts UUIDs and addresses from the native backtrace, locates dSYM debug symbols, and runs atos to produce function names with source file and line numbers. Automatically downloads .dwarf symbols from the Microsoft symbol server using Mach-O UUIDs. USE FOR triaging a .NET MAUI or Mono app crash from an .ips file on any Apple platform, resolving native backtrace frames in libcoreclr or libmonosgen-2.0 to .NET runtime source code, retrieving .ips crash logs from a connected iOS device or iPhone, or investigating EXC_CRASH, EXC_BAD_ACCESS, SIGABRT, or SIGSEGV originating from the .NET runtime. DO NOT USE FOR pure Swift\u002FObjective-C crashes with no .NET components, or Android tombstone files. INVOKES Symbolicate-Crash.ps1 script, atos, dwarfdump, idevicecrashreport.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1586,1587,1588,1591,1594],{"name":17,"slug":18,"type":15},{"name":1559,"slug":1560,"type":15},{"name":1589,"slug":1590,"type":15},"iOS","ios",{"name":1592,"slug":1593,"type":15},"macOS","macos",{"name":1595,"slug":1596,"type":15},"Observability","observability","2026-07-12T08:23:20.369986",{"slug":1599,"name":1599,"fn":1600,"description":1601,"org":1602,"tags":1603,"stars":22,"repoUrl":23,"updatedAt":1611},"assertion-quality","evaluate assertion quality in test suites","Analyzes the variety and depth of assertions across test suites in any language. Use when the user asks to evaluate assertion quality, find shallow tests, identify assertion-free tests (no assertions or only trivial ones like Assert.IsNotNull \u002F toBeTruthy()), flag self-referential or tautological assertions, measure assertion diversity, or audit whether tests verify different facets of behavior. Polyglot: .NET, Python, TS\u002FJS, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, C++. DO NOT USE FOR: writing new tests (use code-testing-agent \u002F writing-mstest-tests), mutation reasoning about whether tests would catch a bug (use test-gap-analysis), or a general severity-ranked anti-pattern audit (use test-anti-patterns), fixing or rewriting assertions, or writing, fixing, or modernizing MSTest tests, assertions, or attributes (use writing-mstest-tests).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1604,1605,1608],{"name":1556,"slug":1557,"type":15},{"name":1606,"slug":1607,"type":15},"QA","qa",{"name":1609,"slug":1610,"type":15},"Testing","testing","2026-07-12T08:23:51.277743",{"slug":1613,"name":1613,"fn":1614,"description":1615,"org":1616,"tags":1617,"stars":22,"repoUrl":23,"updatedAt":1630},"author-component","create and review Blazor components","Create or review Blazor components (.razor files) with correct architecture. USE FOR: writing new Blazor components that do NOT involve JavaScript interop, implementing parameters and EventCallback, RenderFragment slots, component lifecycle (OnInitializedAsync, OnParametersSet), async patterns, IAsyncDisposable, CancellationToken, CSS isolation, code-behind. DO NOT USE FOR: creating new projects (use create-blazor-project), JavaScript interop or calling browser APIs from Blazor (use use-js-interop), forms and validation (use collect-user-input), prerendering issues (use support-prerendering), HTTP data fetching patterns (use fetch-and-send-data), coordinating state between unrelated components (use coordinate-components).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1618,1619,1621,1624,1627],{"name":17,"slug":18,"type":15},{"name":1620,"slug":796,"type":15},"Blazor",{"name":1622,"slug":1623,"type":15},"C#","csharp",{"name":1625,"slug":1626,"type":15},"UI Components","ui-components",{"name":1628,"slug":1629,"type":15},"Web Development","web-development","2026-07-15T06:03:29.216359",{"slug":1632,"name":1632,"fn":1633,"description":1634,"org":1635,"tags":1636,"stars":22,"repoUrl":23,"updatedAt":1640},"binlog-failure-analysis","analyze MSBuild binary logs","Analyze MSBuild binary logs to diagnose build failures. USE FOR: build errors that are unclear from console output, diagnosing cascading failures across multi-project builds, tracing MSBuild target execution order, and generally any MSBuild build issues. Requires an existing .binlog file. DO NOT USE FOR: generating binlogs (use binlog-generation), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1637,1638,1639],{"name":1556,"slug":1557,"type":15},{"name":1559,"slug":1560,"type":15},{"name":1577,"slug":1578,"type":15},"2026-07-12T08:21:34.637923",{"slug":1642,"name":1642,"fn":1643,"description":1644,"org":1645,"tags":1646,"stars":22,"repoUrl":23,"updatedAt":1652},"binlog-generation","generate MSBuild binary logs for diagnostics","Generate MSBuild binary logs (binlogs) for build diagnostics and analysis. USE FOR: adding \u002Fbl:{} to any dotnet build, test, pack, publish, or restore command to capture a full build execution trace, prerequisite for binlog-failure-analysis and build-perf-diagnostics skills, enabling post-build investigation of errors or performance. Requires MSBuild 17.8+ \u002F .NET 8 SDK+ for {} placeholder; PowerShell needs -bl:{{}}. DO NOT USE FOR: non-MSBuild build systems (npm, Maven, CMake), analyzing an existing binlog (use binlog-failure-analysis instead).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1647,1648,1649],{"name":13,"slug":14,"type":15},{"name":1559,"slug":1560,"type":15},{"name":1650,"slug":1651,"type":15},"Engineering","engineering","2026-07-19T05:38:19.340791",96,{"items":1655,"total":1760},[1656,1668,1675,1682,1690,1696,1704,1710,1716,1726,1739,1750],{"slug":1657,"name":1657,"fn":1658,"description":1659,"org":1660,"tags":1661,"stars":1665,"repoUrl":1666,"updatedAt":1667},"multithreaded-task-migration","migrate MSBuild tasks to multithreaded mode","Guide for migrating MSBuild tasks to multithreaded mode support, including compatibility red-team review. Use this when converting tasks to thread-safe versions, implementing IMultiThreadableTask, adding TaskEnvironment support, or auditing migrations for behavioral compatibility.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1662,1663,1664],{"name":17,"slug":18,"type":15},{"name":1650,"slug":1651,"type":15},{"name":1562,"slug":1563,"type":15},5535,"https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fmsbuild","2026-07-22T05:37:33.965588",{"slug":1549,"name":1549,"fn":1550,"description":1551,"org":1669,"tags":1670,"stars":22,"repoUrl":23,"updatedAt":1564},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1671,1672,1673,1674],{"name":17,"slug":18,"type":15},{"name":1556,"slug":1557,"type":15},{"name":1559,"slug":1560,"type":15},{"name":1562,"slug":1563,"type":15},{"slug":1566,"name":1566,"fn":1567,"description":1568,"org":1676,"tags":1677,"stars":22,"repoUrl":23,"updatedAt":1579},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1678,1679,1680,1681],{"name":17,"slug":18,"type":15},{"name":1573,"slug":1574,"type":15},{"name":1559,"slug":1560,"type":15},{"name":1577,"slug":1578,"type":15},{"slug":1581,"name":1581,"fn":1582,"description":1583,"org":1683,"tags":1684,"stars":22,"repoUrl":23,"updatedAt":1597},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1685,1686,1687,1688,1689],{"name":17,"slug":18,"type":15},{"name":1559,"slug":1560,"type":15},{"name":1589,"slug":1590,"type":15},{"name":1592,"slug":1593,"type":15},{"name":1595,"slug":1596,"type":15},{"slug":1599,"name":1599,"fn":1600,"description":1601,"org":1691,"tags":1692,"stars":22,"repoUrl":23,"updatedAt":1611},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1693,1694,1695],{"name":1556,"slug":1557,"type":15},{"name":1606,"slug":1607,"type":15},{"name":1609,"slug":1610,"type":15},{"slug":1613,"name":1613,"fn":1614,"description":1615,"org":1697,"tags":1698,"stars":22,"repoUrl":23,"updatedAt":1630},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1699,1700,1701,1702,1703],{"name":17,"slug":18,"type":15},{"name":1620,"slug":796,"type":15},{"name":1622,"slug":1623,"type":15},{"name":1625,"slug":1626,"type":15},{"name":1628,"slug":1629,"type":15},{"slug":1632,"name":1632,"fn":1633,"description":1634,"org":1705,"tags":1706,"stars":22,"repoUrl":23,"updatedAt":1640},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1707,1708,1709],{"name":1556,"slug":1557,"type":15},{"name":1559,"slug":1560,"type":15},{"name":1577,"slug":1578,"type":15},{"slug":1642,"name":1642,"fn":1643,"description":1644,"org":1711,"tags":1712,"stars":22,"repoUrl":23,"updatedAt":1652},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1713,1714,1715],{"name":13,"slug":14,"type":15},{"name":1559,"slug":1560,"type":15},{"name":1650,"slug":1651,"type":15},{"slug":1717,"name":1717,"fn":1718,"description":1719,"org":1720,"tags":1721,"stars":22,"repoUrl":23,"updatedAt":1725},"build-parallelism","optimize MSBuild build parallelism","Diagnose and fix under-parallelized MSBuild builds. USE WHEN a multi-project solution build is slower than expected, doesn't speed up when you add cores, pegs a single core while others idle, or you want to know why `-m` isn't helping. Note: `\u002Fmaxcpucount` default is 1 (sequential) — always pass `-m` for parallel builds. Covers finding the critical path (longest serial ProjectReference chain), graph build (`\u002Fgraph`), BuildInParallel, and solution filters (`.slnf`). DO NOT USE FOR: single-project builds, incremental issues (use incremental-build), compilation slowness inside one project (use build-perf-diagnostics), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1722,1723,1724],{"name":17,"slug":18,"type":15},{"name":1650,"slug":1651,"type":15},{"name":1562,"slug":1563,"type":15},"2026-07-19T05:38:18.364937",{"slug":1727,"name":1727,"fn":1728,"description":1729,"org":1730,"tags":1731,"stars":22,"repoUrl":23,"updatedAt":1738},"build-perf-baseline","establish and optimize build performance baselines","Establish build performance baselines and apply systematic optimization techniques. USE FOR: diagnosing slow builds, establishing before\u002Fafter measurements (cold, warm, no-op scenarios), applying optimization strategies like MSBuild Server, static graph builds, artifacts output, and dependency graph trimming. Start here before diving into build-perf-diagnostics, incremental-build, or build-parallelism. DO NOT USE FOR: non-MSBuild build systems, detailed bottleneck analysis (use build-perf-diagnostics after baselining).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1732,1733,1736,1737],{"name":1650,"slug":1651,"type":15},{"name":1734,"slug":1735,"type":15},"Monitoring","monitoring",{"name":1562,"slug":1563,"type":15},{"name":1609,"slug":1610,"type":15},"2026-07-12T08:21:35.865649",{"slug":1740,"name":1740,"fn":1741,"description":1742,"org":1743,"tags":1744,"stars":22,"repoUrl":23,"updatedAt":1749},"build-perf-diagnostics","diagnose MSBuild build performance bottlenecks","Diagnose MSBuild build performance bottlenecks using binary log analysis. USE FOR: identifying why builds are slow by analyzing binlog performance summaries, detecting ResolveAssemblyReference (RAR) taking >5s, Roslyn analyzers consuming >30% of Csc time, single targets dominating >50% of build time, node utilization below 80%, excessive Copy tasks, NuGet restore running every build. Covers timeline analysis, Target\u002FTask Performance Summary interpretation, and 7 common bottleneck categories. Use after build-perf-baseline has established measurements. DO NOT USE FOR: establishing initial baselines (use build-perf-baseline first), fixing incremental build issues (use incremental-build), parallelism tuning (use build-parallelism), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1745,1746,1747,1748],{"name":17,"slug":18,"type":15},{"name":1559,"slug":1560,"type":15},{"name":1650,"slug":1651,"type":15},{"name":1562,"slug":1563,"type":15},"2026-07-12T08:21:40.961722",{"slug":1751,"name":1751,"fn":1752,"description":1753,"org":1754,"tags":1755,"stars":22,"repoUrl":23,"updatedAt":1759},"check-bin-obj-clash","detect MSBuild output path conflicts","Detects MSBuild projects with conflicting OutputPath or IntermediateOutputPath. USE FOR: builds failing with 'Cannot create a file when that file already exists', 'The process cannot access the file because it is being used by another process', intermittent build failures that succeed on retry, or missing\u002Foverwritten outputs in multi-project or multi-targeting builds where bin\u002Fobj (or project.assets.json) collide. Common causes: shared OutputPath, missing AppendTargetFrameworkToOutputPath, extra global properties (e.g. PublishReadyToRun), or SetTargetFramework on a ProjectReference to a single-targeting project. DO NOT USE FOR: file access errors unrelated to MSBuild (OS-level locking), single-project single-TFM builds, non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1756,1757,1758],{"name":1559,"slug":1560,"type":15},{"name":1650,"slug":1651,"type":15},{"name":1606,"slug":1607,"type":15},"2026-07-19T05:38:14.336279",144]