.ai/skills/build-common/SKILL.md
Shared XerahS build guardrails for all platforms. Use with platform build skills when handling timeouts, stale dotnet processes, file locks, single-node MSBuild, build-server shutdown, and centrally managed dependency versions.
npx skillsauth add sharex/xerahs build-commonInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill as the shared preface for platform-specific build skills:
The platform skills own their command details and artifact checks. This file owns shared failure-handling rules.
-m:1 or /m:1) when file locks or shared output races appear.<TreatWarningsAsErrors>.net10.0-windows10.0.26100.0 as the Windows target framework moniker; do not downgrade it to net10.0-windows.Directory.Packages.props version. Do not reintroduce a project-local legacy pin.Common symptoms:
CS2012: Cannot open ... for writingThe process cannot access the file ... because it is being used by another processCompileAvaloniaXamlTask copy failures.NET Host, dotnet, MSBuild, VBCSCompiler, or csc named as the lock holderWindows cleanup:
dotnet build-server shutdown
Get-Process | Where-Object {
$_.Name -like '*dotnet*' -or
$_.Name -like '*MSBuild*' -or
$_.Name -like '*VBCSCompiler*' -or
$_.Name -like '*csc*'
} | Stop-Process -Force -ErrorAction SilentlyContinue
Start-Sleep -Seconds 2
Linux cleanup:
pkill -f "package-linux.sh" 2>/dev/null || true
pkill -f "dotnet publish" 2>/dev/null || true
pkill -f "dotnet build" 2>/dev/null || true
sleep 2
After stopping lock holders, clean only the affected project or output folders first. Remove obj folders only when normal clean still fails.
ShareX.ImageEditor and some plugins can race on shared build outputs during parallel builds. If lock errors mention ShareX.ImageEditor.dll, plugin DLLs, or Android wrapped .so files:
dotnet build "ShareX.ImageEditor\src\ShareX.ImageEditor\ShareX.ImageEditor.csproj" -c Release -p:UseSharedCompilation=false -m:1
Then rerun the platform-specific script from the relevant build skill.
For normal code/config changes before push:
dotnet build src/desktop/XerahS.sln
For packaging tasks, also verify the expected artifacts in dist/ or the platform-specific output path documented by the relevant build skill.
testing
Reference for writing effective XerahS Improvement Proposals (XIPs), including structure, templates, review checks, and implementation patterns. Use sync-xips for creating, editing, and syncing XIP GitHub issues and local backups.
documentation
Rules and workflows for updating docs/CHANGELOG.md, including version grouping, consolidation, and commit-entry attribution.
testing
Create and maintain XerahS Improvement Proposals (XIPs) with GitHub as source of truth and docs/proposals/xip folder as backup. Use when creating or editing XIPs, syncing XIPs between GitHub issues and the docs/proposals/xip folder, or when the user mentions XIP, GitHub issues for XIP, or local XIP files.
documentation
Repository maintenance preparation for XerahS. Use before release or changelog work to sync repositories, inspect submodule state, identify version/changelog needs, and hand off commit/push/version rules to git-workflow.