From 0289b77c2bf83994c5a3641b873d251fcc216e8e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 6 Aug 2026 15:36:05 +0000 Subject: [PATCH] Add SolutionX item template creating an empty slnx file Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com> --- .../localize/templatestrings.en.json | 5 +++++ .../SolutionX/.template.config/template.json | 19 +++++++++++++++++++ .../content/SolutionX/Solution1.slnx | 2 ++ .../XML-Solution-File/item.slnx | 2 ++ .../std-streams/stdout.txt | 1 + ...ests.CanDoTabCompletion.Linux.verified.txt | 1 + ...eTests.CanDoTabCompletion.OSX.verified.txt | 1 + ...ts.CanDoTabCompletion.Windows.verified.txt | 1 + .../CommonTemplatesTests.cs | 2 ++ 9 files changed, 34 insertions(+) create mode 100644 template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/.template.config/localize/templatestrings.en.json create mode 100644 template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/.template.config/template.json create mode 100644 template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/Solution1.slnx create mode 100644 test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#XML-Solution-File#-n#item.verified/XML-Solution-File/item.slnx create mode 100644 test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#XML-Solution-File#-n#item.verified/std-streams/stdout.txt diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..9fbe41bb249a --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/.template.config/localize/templatestrings.en.json @@ -0,0 +1,5 @@ +{ + "author": "Microsoft", + "name": "XML Solution File", + "description": "Create an empty XML solution (slnx) containing no projects" +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/.template.config/template.json new file mode 100644 index 000000000000..cc3952c92e1f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/.template.config/template.json @@ -0,0 +1,19 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ + "Solution" + ], + "name": "XML Solution File", + "generatorVersions": "[1.0.0.0-*)", + "description": "Create an empty XML solution (slnx) containing no projects", + "groupIdentity": "ItemSolutionX", + "precedence": "102", + "identity": "Microsoft.Standard.QuickStarts.SolutionX", + "shortName": [ + "slnx", + "solutionx" + ], + "sourceName": "Solution1", + "defaultName": "Solution1" +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/Solution1.slnx b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/Solution1.slnx new file mode 100644 index 000000000000..ba788ff0d17d --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/SolutionX/Solution1.slnx @@ -0,0 +1,2 @@ + + diff --git a/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#XML-Solution-File#-n#item.verified/XML-Solution-File/item.slnx b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#XML-Solution-File#-n#item.verified/XML-Solution-File/item.slnx new file mode 100644 index 000000000000..ba788ff0d17d --- /dev/null +++ b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#XML-Solution-File#-n#item.verified/XML-Solution-File/item.slnx @@ -0,0 +1,2 @@ + + diff --git a/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#XML-Solution-File#-n#item.verified/std-streams/stdout.txt b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#XML-Solution-File#-n#item.verified/std-streams/stdout.txt new file mode 100644 index 000000000000..70cab17a4b13 --- /dev/null +++ b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#XML-Solution-File#-n#item.verified/std-streams/stdout.txt @@ -0,0 +1 @@ +The template "%TEMPLATE_NAME%" was created successfully. \ No newline at end of file diff --git a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.Linux.verified.txt b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.Linux.verified.txt index 44d9ee79882a..b5d3a414c8a4 100644 --- a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.Linux.verified.txt +++ b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.Linux.verified.txt @@ -29,6 +29,7 @@ razorclasslib razorcomponent sln slnf +slnx tool-manifest view viewimports diff --git a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.OSX.verified.txt b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.OSX.verified.txt index 44d9ee79882a..b5d3a414c8a4 100644 --- a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.OSX.verified.txt +++ b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.OSX.verified.txt @@ -29,6 +29,7 @@ razorclasslib razorcomponent sln slnf +slnx tool-manifest view viewimports diff --git a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.Windows.verified.txt b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.Windows.verified.txt index 44d9ee79882a..b5d3a414c8a4 100644 --- a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.Windows.verified.txt +++ b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.Windows.verified.txt @@ -29,6 +29,7 @@ razorclasslib razorcomponent sln slnf +slnx tool-manifest view viewimports diff --git a/test/dotnet-new.IntegrationTests/CommonTemplatesTests.cs b/test/dotnet-new.IntegrationTests/CommonTemplatesTests.cs index 28390b5b6d46..459f3641f880 100644 --- a/test/dotnet-new.IntegrationTests/CommonTemplatesTests.cs +++ b/test/dotnet-new.IntegrationTests/CommonTemplatesTests.cs @@ -52,6 +52,8 @@ public static void ClassInitialize(TestContext ctx) [DataRow("Solution File", "sln", new[] { "--format", "sln" })] [DataRow("Solution File", "sln", new[] { "--format", "slnx" })] [DataRow("Solution File", "solution", null)] + [DataRow("XML Solution File", "slnx", null)] + [DataRow("XML Solution File", "solutionx", null)] [DataRow("Solution Filter File", "slnf", new[] { "--parent-solution", "Parent.slnx" })] [DataRow("Solution Filter File", "slnf", new[] { "-s", "Parent.slnx" })] [DataRow("Solution Filter File", "solutionfilter", new[] { "--parent-solution", "Parent.slnx" })]