Files
LabApiPluginTemplate/.template.config/template.json
T
Admin a17066c97b 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.
2026-08-27 22:01:37 +02:00

57 lines
1.6 KiB
JSON

{
"$schema": "http://json.schemastore.org/template",
"classifications": [ "Common", "Library", "SCP:SL", "LabAPI", "Game Plugin" ],
"identity": "SCPSL.LabApi.PluginTemplate",
"name": "SCP: Secret Laboratory LabAPI Plugin",
"shortName": "labapi-plugin",
"tags": {
"language": "C#",
"type": "project"
},
"sourceName": "LabApiPluginTemplate",
"preferNameDirectory": true,
"sources": [
{
"source": "./content",
"target": "./"
}
],
"symbols": {
"PluginAuthor": {
"type": "parameter",
"datatype": "string",
"defaultValue": "Your Name",
"replaces": "YourName",
"description": "Name used as the plugin's author."
},
"PluginDescription": {
"type": "parameter",
"datatype": "string",
"defaultValue": "Your Description",
"replaces": "TODO: describe what this plugin does.",
"description": "Short description of what the plugin does."
}
},
"primaryOutputs": [
{ "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": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
}
]
}