Skip to content

Share template manifest between VSIX and dotnet-new#6476

Merged
DinahK-2SO merged 5 commits into
user/muyuanli/dotnetnewtemplatefrom
user/DinahK-2SO/unit_template_list
May 13, 2026
Merged

Share template manifest between VSIX and dotnet-new#6476
DinahK-2SO merged 5 commits into
user/muyuanli/dotnetnewtemplatefrom
user/DinahK-2SO/unit_template_list

Conversation

@DinahK-2SO
Copy link
Copy Markdown
Contributor

@DinahK-2SO DinahK-2SO commented May 13, 2026

Goal: unify how VSIX and dotnet-new templates are declared, so adding a new C# template is a one-entry change (per Scott's review feedback).

Implementation:

  • New shared manifest dev/Templates/templates.props with 6 item types covering the dotnet-new × VSIX matrix (shared / VSIX-only / dotnet-new-only, × project / item).
  • Dotnet csproj: inline C# MSBuild task expands the manifest into <None Pack=true> items.
  • VSIX csproj: MSBuild item transforms turn the manifest into <ProjectReference> items.

Verified: dotnet pack output is byte-equal to pre-refactor (179 files); VSIX evaluation still resolves all 14 template ProjectReferences; C++ VSIX is untouched.

Docs: how-to-create-a-new-csharp-template.md.

@DinahK-2SO DinahK-2SO merged commit 4826631 into user/muyuanli/dotnetnewtemplate May 13, 2026
1 check passed
@DinahK-2SO DinahK-2SO deleted the user/DinahK-2SO/unit_template_list branch May 13, 2026 04:36
@Scottj1s
Copy link
Copy Markdown
Member

Love this! thanks @DinahK-2SO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants