Files
vs-code-dotnet-solution-lau…/package.json
T
maxandClaude Fable 5.1 3f67eef9aa Initial version of .NET Solution Launcher
Startup project and solution configuration (Debug|x64, Test|x64, ...) in
the status bar, with build and debug tasks that pass both configuration
and platform. Made for DotRush, whose build never passes -p:Platform and
whose status item shows the configuration but not the project.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169iPWwKHZoBTNN9qwXiwqk
2026-09-08 13:10:55 +02:00

168 lines
7.2 KiB
JSON

{
"name": "dotnet-solution-launcher",
"displayName": ".NET Solution Launcher",
"description": "Startup project and solution configuration (Debug|x64, Test|x64, ...) in the status bar, with build and debug that honour them. Made for DotRush, which shows the configuration but not the project and never passes the platform.",
"version": "0.1.0",
"publisher": "local",
"license": "MIT",
"engines": {
"vscode": "^1.85.0"
},
"categories": [
"Debuggers",
"Other"
],
"keywords": [
"dotnet",
"csharp",
"solution",
"configuration",
"dotrush",
"startup project"
],
"activationEvents": [
"onLanguage:csharp",
"onDebug",
"workspaceContains:**/*.{sln,slnx,csproj}"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{ "command": "dotnetSolution.selectStartupProject", "title": "Select Startup Project", "category": ".NET Solution" },
{ "command": "dotnetSolution.selectConfiguration", "title": "Select Configuration", "category": ".NET Solution" },
{ "command": "dotnetSolution.selectSolution", "title": "Select Solution", "category": ".NET Solution" },
{ "command": "dotnetSolution.build", "title": "Build", "category": ".NET Solution", "icon": "$(tools)" },
{ "command": "dotnetSolution.rebuild", "title": "Rebuild", "category": ".NET Solution" },
{ "command": "dotnetSolution.clean", "title": "Clean", "category": ".NET Solution" },
{ "command": "dotnetSolution.debug", "title": "Debug Startup Project", "category": ".NET Solution", "icon": "$(debug-alt)" },
{ "command": "dotnetSolution.run", "title": "Run Startup Project (without debugging)", "category": ".NET Solution", "icon": "$(play)" },
{ "command": "dotnetSolution.generateLaunchConfig", "title": "Create launch.json and tasks.json entries", "category": ".NET Solution" },
{ "command": "dotnetSolution.reload", "title": "Reload Solution", "category": ".NET Solution" },
{ "command": "dotnetSolution.showOutput", "title": "Show Log", "category": ".NET Solution" },
{ "command": "dotnetSolution.setStartupProject", "title": "Set as Startup Project (.NET Solution)", "category": ".NET Solution" }
],
"menus": {
"explorer/context": [
{
"command": "dotnetSolution.setStartupProject",
"when": "resourceExtname =~ /\\.(cs|fs|vb)proj$/",
"group": "dotnet_0@0"
}
],
"commandPalette": [
{ "command": "dotnetSolution.setStartupProject", "when": "false" }
]
},
"taskDefinitions": [
{
"type": "dotnet-solution",
"required": [],
"properties": {
"target": {
"type": "string",
"enum": ["build", "rebuild", "clean"],
"default": "build",
"description": "What to do. Defaults to build."
},
"scope": {
"type": "string",
"enum": ["solution", "project"],
"description": "Build the whole solution with the selected solution configuration, or only the startup project with the project configuration the solution maps it to. Defaults to the dotnetSolution.buildScope setting."
},
"args": {
"type": "array",
"items": { "type": "string" },
"description": "Extra arguments appended to the dotnet command."
}
}
}
],
"problemMatchers": [],
"configuration": {
"title": ".NET Solution Launcher",
"properties": {
"dotnetSolution.solution": {
"type": "string",
"default": "",
"description": "Solution file to use, relative to the workspace. Empty picks the one closest to the workspace root, preferring the one with the most projects."
},
"dotnetSolution.buildScope": {
"type": "string",
"enum": ["solution", "project"],
"enumDescriptions": [
"dotnet build <solution> -c <Configuration> -p:Platform=<Platform>. Honours solution-level project dependencies and per-project configuration mapping, like Visual Studio's Build Solution.",
"dotnet build <startup project> with the configuration and platform the solution maps it to. Faster, but ignores dependencies that only exist in the .sln (ProjectDependencies)."
],
"default": "solution",
"description": "What the build task builds before a launch."
},
"dotnetSolution.targetFramework": {
"type": "string",
"default": "",
"description": "Target framework to launch for multi-targeting projects (TargetFrameworks). Empty uses the first one."
},
"dotnetSolution.launch.args": {
"type": "array",
"items": { "type": "string" },
"default": [],
"description": "Arguments passed to the startup project when launched from this extension."
},
"dotnetSolution.launch.env": {
"type": "object",
"additionalProperties": { "type": "string" },
"default": {},
"description": "Environment variables for the launched startup project."
},
"dotnetSolution.launch.cwd": {
"type": "string",
"default": "",
"description": "Working directory for the launched startup project. Empty uses the output directory (TargetDir)."
},
"dotnetSolution.launch.console": {
"type": "string",
"enum": ["internalConsole", "integratedTerminal", "externalTerminal"],
"default": "internalConsole",
"description": "Console for the debugged application."
},
"dotnetSolution.debugType": {
"type": "string",
"default": "coreclr",
"description": "Debug adapter type. DotRush and C# Dev Kit both provide coreclr."
},
"dotnetSolution.syncDotRush": {
"type": "boolean",
"default": true,
"markdownDescription": "Keep DotRush's own startup project in sync (`dotrush.setStartupProject`), so its test explorer, launchSettings lookup and `${command:dotrush.activeProjectPath}` agree with the status bar here."
},
"dotnetSolution.syncDotRushWorkspaceProperties": {
"type": "boolean",
"default": false,
"markdownDescription": "Write `Configuration=<Cfg>;Platform=<Platform>` into `dotrush.roslyn.workspaceProperties` when the configuration changes, so IntelliSense sees the same DefineConstants as the build. DotRush reloads its workspace on each change, which is why this is off by default."
},
"dotnetSolution.additionalBuildArguments": {
"type": "array",
"items": { "type": "string" },
"default": [],
"description": "Extra arguments for every dotnet build / clean run by this extension."
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile",
"test": "node ./out/test/runTest.js",
"test:unit": "npm run compile && mocha --ui tdd out/test/unit/*.test.js"
},
"devDependencies": {
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.0",
"@types/vscode": "^1.85.0",
"@vscode/test-electron": "^2.4.1",
"mocha": "^10.4.0",
"typescript": "^5.4.0"
}
}