Restructure template so solution files sit above the project folder

AGENTS.md, CLAUDE.md and the .slnx now live at the root of the
generated output, while the .csproj and other project-specific files
(.editorconfig, source files) stay nested inside a subfolder named
after the project.

Single dotnet new invocation now produces:

  ProjectName/
  ├── ProjectName.slnx
  ├── AGENTS.md
  ├── CLAUDE.md
  └── ProjectName/
      ├── ProjectName.csproj
      └── ...

Adds a post-action to register the generated project in the .slnx via
'dotnet sln add'. Verified end-to-end with a local dotnet new install.
This commit is contained in:
2026-08-27 22:01:37 +02:00
parent 36a7c28c36
commit a17066c97b
6 changed files with 11 additions and 6 deletions
+9 -1
View File
@@ -33,9 +33,17 @@
}
},
"primaryOutputs": [
{ "path": "LabApiPluginTemplate.csproj" }
{ "path": "LabApiPluginTemplate/LabApiPluginTemplate.csproj" }
],
"postActions": [
{
"description": "Adds the generated project to the nearest solution file, if one exists.",
"manualInstructions": [
{ "text": "Run 'dotnet sln add' manually to add the project to your solution." }
],
"actionId": "D396686C-DE0E-4DE6-906D-291CD29FC5DE",
"continueOnError": true
},
{
"description": "Restores the NuGet packages required by this project.",
"manualInstructions": [