Skip to content

Add SolutionX item template for creating an empty slnx file - #55638

Open
ViktorHofer with Copilot wants to merge 1 commit into
mainfrom
copilot/add-solution-x-template
Open

Add SolutionX item template for creating an empty slnx file#55638
ViktorHofer with Copilot wants to merge 1 commit into
mainfrom
copilot/add-solution-x-template

Conversation

Copilot AI commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Adds a dedicated item template that creates an empty .slnx solution file. Output matches dotnet new sln (which already defaults to slnx), but this template intentionally exposes no --format option.

$ dotnet new slnx -n MySolution
The template "XML Solution File" was created successfully.

$ cat MySolution.slnx
<Solution>
</Solution>

Template

  • New template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/ modeled on the existing Solution template:
    • Solution1.slnx content file only — no .sln variant, no Format symbol, no dotnetcli.host.json.
    • Identity Microsoft.Standard.QuickStarts.SolutionX, group ItemSolutionX, short names slnx / solutionx, name "XML Solution File".
  • English templatestrings.en.json; other locales flow through the loc pipeline.

Tests

  • AllCommonItemsCreate rows for both short names, with a new approval snapshot.
  • slnx added to the CanDoTabCompletion approvals (new template group contributes its primary short name).

Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@ViktorHofer
ViktorHofer marked this pull request as ready for review August 6, 2026 16:09
@ViktorHofer
ViktorHofer requested review from a team as code owners August 6, 2026 16:09
Copilot AI review requested due to automatic review settings August 6, 2026 16:09
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@ViktorHofer
ViktorHofer requested a review from baronfel August 6, 2026 16:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new common item template that generates an empty .slnx (XML solution) file, providing a direct dotnet new slnx/dotnet new solutionx experience without exposing a --format option (unlike the existing sln template).

Changes:

  • Added a new item template under template_feed/.../SolutionX/ that emits an empty Solution1.slnx.
  • Extended dotnet new integration coverage to create the template via both short names (slnx, solutionx) with an approval snapshot.
  • Updated tab-completion approval baselines to include slnx across Windows/Linux/macOS.
Show a summary per file
File Description
test/dotnet-new.IntegrationTests/CommonTemplatesTests.cs Adds AllCommonItemsCreate coverage for the new XML Solution File template via slnx and solutionx.
test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.Windows.verified.txt Updates tab-completion baseline to include slnx.
test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.OSX.verified.txt Updates tab-completion baseline to include slnx.
test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.Linux.verified.txt Updates tab-completion baseline to include slnx.
test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#XML-Solution-File#-n#item.verified/XML-Solution-File/item.slnx Adds approval snapshot for generated .slnx output.
test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#XML-Solution-File#-n#item.verified/std-streams/stdout.txt Adds approval snapshot for command stdout for the new template scenario.
template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/Solution1.slnx Adds the template content file for an empty .slnx.
template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/.template.config/template.json Registers the new SolutionX item template (identity/group/short names/metadata).
template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/.template.config/localize/templatestrings.en.json Adds English-localized strings for name/description/author.

Copilot's findings

  • Files reviewed: 9/9 changed files
  • Comments generated: 0

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants