Skip to content

Test the Azure DevOps templates during package installation - #142

Merged
dennisdoomen merged 1 commit into
mainfrom
claude/issue-130-f752fc
Sep 27, 2026
Merged

dennisdoomen merged 1 commit into
mainfrom
claude/issue-130-f752fc

Conversation

@dennisdoomen

Copy link
Copy Markdown
Owner

Summary

  • TestPackageInstallation only installed the four GitHub-based template variants via dotnet new; the two azdo-* templates added in Add Azure DevOps pipeline template #85 were never exercised.
  • Short names are now read from the rendered template.json files instead of a hard-coded list, so a future template variant can't be forgotten again.
  • The azdo-* templates are now installed with --organization/--projectName, and a new assertion checks the generated Build/Build.cs to confirm the symbol replacement actually happened.
  • Deduplicated the repeated ["Normal", "SourceOnly", ...] variant-name arrays into one TemplateVariantNames constant.

Bug found by the new test

The Azdo template's project symbol produced a --project CLI switch, which collides with dotnet new's own built-in --project option (used for template context evaluation) — so that parameter could never actually be set from the command line. Renamed the symbol to projectName (--projectName) in the template, and updated the corresponding examples in the README and Adopt-StarterKit.ps1.

Test plan

  • ./build.ps1 TestPackageInstallation --skip ScanPackages — installs and builds all six templates (including both Azdo variants with --organization/--projectName), the two --benchmarks variants, the Renovate variant, and the existing-library adoption flow.
  • ./build.ps1 TestTemplateBuild — builds the rendered template folders for all six variants.

Fixes #130

🤖 Generated with Claude Code

TestPackageInstallation only installed the four GitHub-based template
variants via dotnet new, never the two azdo-* templates added in #85.
It also hard-coded the list of short names, so a future variant could
be forgotten again.

Short names are now read from the rendered template.json files, and
the azdo-* templates are installed with --organization/--projectName
to exercise their symbol replacement, asserted against the generated
Build/Build.cs.

This also uncovered a real bug: the Azdo template's "project" symbol
produced a --project switch that collides with dotnet new's own
built-in --project option (used for template context evaluation), so
that parameter could never actually be set. Renamed the symbol to
projectName (--projectName) and updated the README and
Adopt-StarterKit.ps1 accordingly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dennisdoomen
dennisdoomen merged commit fa28774 into main Sep 27, 2026
1 check passed
@dennisdoomen
dennisdoomen deleted the claude/issue-130-f752fc branch September 27, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: TestPackageInstallation does not test the Azure DevOps templates

1 participant