microsoft/local-publish-sts
Build SQL Tools Service (STS) and run the Cake LocalPublish target so the resulting binaries are available under artifacts/publish for local testing. Use when: building STS locally, running LocalPublish, rebuilding STS after code changes, preparing STS for use by another extension/client, "publish STS", "local publish", "build SQL Tools Service", "rebuild STS". This skill only builds; if the goal is to also point vscode-mssql at the output, follow up with the `hook-local-sts-into-mssql` skill.
npx skills add https://github.com/microsoft/sqltoolsservice --skill local-publish-sts
Build and publish the SQL Tools Service locally via the Cake LocalPublish target. Produces a runnable MicrosoftSqlToolsServiceLayer host plus all companion service DLLs under artifacts/publish/.
This skill only builds. To wire the output into a vscode-mssql repo's environment, run the hook-local-sts-into-mssql skill afterward.
From the STS repo root:
Windows:
.\build.ps1 --target=LocalPublish --configuration=Debug
On non-Windows:
./build.sh --target=LocalPublish --configuration=Debug
The build typically takes ~1–2 minutes on a warm cache. Use an initial_wait of at least 300 seconds when running via tools that need a hint.
The published binaries live at (relative to repo root):
artifacts/publish/Microsoft.SqlTools.ServiceLayer/default/net10.0/
(.NET version may differ in the rare case that we've bumped to a new version)
Verify with Test-Path against MicrosoftSqlToolsServiceLayer.exe (Windows) or MicrosoftSqlToolsServiceLayer (Linux/macOS).
Tell the user:
Defined in build.cake (search for Task(...)). For day-to-day dev, LocalPublish is what you want. The others are situational:
| Target | What it does | When to use |
| ---------------------- | ---------------------------------------------------------------- | ----------------------------------------- |
| LocalPublish | Build + publish for the current RID only | Default dev loop |
| Quick | Cleanup + LocalPublish | After a botched build to start clean |
| Install | Cleanup + LocalPublish + copy to ~/.sqltoolsservice/local/ | Sharing with a globally-configured client |
| Local | Setup + Restore + TestAll + LocalPublish | Pre-PR sanity pass |
| Default | Alias for Local | Same as above |
| AllPublish | Publish for all RIDs in build.json | Reproducing CI artifacts |
| TestAll / TestCore | Run unit tests, must include --runTests argument | Test-only iteration |
Configuration flag accepts Debug (default for local work) or Release.
If LocalPublish fails with MSB3027 / MSB3021 "file is locked" errors mentioning MicrosoftSqlToolsServiceLayer.dll, Microsoft.SqlTools.Hosting.dll,
or sibling DLLs, a previously launched consumer process is still running an STS host and holds locks on the publish output.
Get-CimInstance Win32_Process -Filter "Name='dotnet.exe'" |
Where-Object {
$_.CommandLine -like "*MicrosoftSqlToolsServiceLayer.dll*" -or
$_.CommandLine -like "*SqlToolsResourceProviderService.dll*"
} |
Select-Object ProcessId, CommandLine
active EDH / Azure Data Studio session they'd prefer to close manually.
the agent runtime):
Stop-Process -Id <PID1>,<PID2> -Force
net10.0 segment of the publish path tracks the Frameworks array in build.json. If the framework version changes, read build.json to get the new path segment rather than hardcoding it.LocalPublish writes to the default RID slot specifically because it depends on the RestrictToLocalRuntime task. Other RIDs only appear after AllPublish.Take microsoft/local-publish-sts from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.