# Send MSBuild Top 80 Commands to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "msbuild",
    "name": "MSBuild Top 80 Commands",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/TheCyberCore/msbuild",
    "canonicalUrl": "https://clawhub.ai/TheCyberCore/msbuild",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/msbuild",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=msbuild",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "manifest.json",
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "msbuild",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-05T06:05:32.470Z",
      "expiresAt": "2026-05-12T06:05:32.470Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=msbuild",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=msbuild",
        "contentDisposition": "attachment; filename=\"msbuild-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "msbuild"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/msbuild"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/msbuild",
    "downloadUrl": "https://openagent3.xyz/downloads/msbuild",
    "agentUrl": "https://openagent3.xyz/skills/msbuild/agent",
    "manifestUrl": "https://openagent3.xyz/skills/msbuild/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/msbuild/agent.md"
  }
}
```
## Documentation

### Purpose

This skill provides a practical, prioritized set of the 80 most useful command templates for working with .NET / ASP.NET projects on the command line using MSBuild (via dotnet msbuild or msbuild). It mirrors a realistic day-to-day workflow: restore → build → test → publish/pack → diagnose → CI hardening.

### Typical ASP.NET Developer Workflow (why these commands are prioritized)

A typical ASP.NET CLI workflow:

Restore dependencies (often locked mode in CI)
Build quickly (Debug) and reliably (Release)
Test repeatedly (filters, logs, results dirs, no-build/no-restore in CI)
Publish artifacts (RID, self-contained, single-file, trimming, ready-to-run)
Package libraries (Pack), versioning
Diagnose build issues (binlog, verbosity, preprocess, graph build)
CI hardening (determinism, CI flags, node reuse, parallelism, reproducibility)

Ranking reflects frequency + impact in that flow.

### Conventions

Prefer cross-platform: dotnet msbuild
On Windows with VS Build Tools you can swap to: msbuild
Targets: /t:<Target>
Properties: /p:Name=Value
Logging: /v:<level>, /bl[:file], /fl, /pp
Multiproc: /m[:n]
Note: dotnet test is included because it is the practical test CLI (it invokes MSBuild under the hood).

### Top 80 Commands (1 = most important)

Replace MySolution.sln / src/MyWeb/MyWeb.csproj / tests/... as needed.

### A) Restore / Build / Clean / Rebuild (daily)

Restore solution

dotnet msbuild MySolution.sln /t:Restore

Build solution (Debug)

dotnet msbuild MySolution.sln /t:Build /p:Configuration=Debug

Build solution (Release)

dotnet msbuild MySolution.sln /t:Build /p:Configuration=Release

Clean solution

dotnet msbuild MySolution.sln /t:Clean /p:Configuration=Debug

Rebuild solution (Clean + Build)

dotnet msbuild MySolution.sln /t:Rebuild /p:Configuration=Release

Restore + Build in one call

dotnet msbuild MySolution.sln /restore /t:Build /p:Configuration=Debug

Build without restore (CI-friendly)

dotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:Restore=false

Parallel build (max CPU)

dotnet msbuild MySolution.sln /t:Build /m /p:Configuration=Release

Quiet-ish CI output

dotnet msbuild MySolution.sln /t:Build /nologo /v:minimal /p:Configuration=Release

Build a single project

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:Configuration=Debug

Set Platform explicitly

dotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:Platform="Any CPU"

Treat warnings as errors

dotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:TreatWarningsAsErrors=true

Deterministic build

dotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:Deterministic=true

CI build mode (SourceLink/versioning behavior)

dotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:ContinuousIntegrationBuild=true

Disable incremental up-to-date checks (force build behavior)

dotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:DisableFastUpToDateCheck=true

Build with defined constants

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:Configuration=Debug /p:DefineConstants="TRACE;DEBUG;MYFLAG"

Set OutputPath (ad-hoc artifacts)

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:Configuration=Release /p:OutputPath=artifacts/bin/

Set BaseIntermediateOutputPath (obj isolation / CI caching)

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:Configuration=Release /p:BaseIntermediateOutputPath=artifacts/obj/

Disable shared compilation (debug odd build behavior)

dotnet msbuild MySolution.sln /t:Build /p:Configuration=Debug /p:UseSharedCompilation=false

Show MSBuild version

dotnet msbuild -version

### B) Tests (practical CLI; MSBuild-based)

Run tests (solution)

dotnet test MySolution.sln -c Release

Tests without build

dotnet test MySolution.sln -c Release --no-build

Tests without restore

dotnet test MySolution.sln -c Release --no-restore

Test a single test project

dotnet test tests/MyWeb.Tests/MyWeb.Tests.csproj -c Debug

Test filter by fully qualified name

dotnet test MySolution.sln -c Release --filter "FullyQualifiedName~MyNamespace"

Test filter by trait/category (example)

dotnet test MySolution.sln -c Release --filter "TestCategory=Integration"

TRX logger

dotnet test MySolution.sln -c Release --logger "trx"

Results directory

dotnet test MySolution.sln -c Release --results-directory artifacts/testresults

Collect coverage (cross-platform collector)

dotnet test MySolution.sln -c Release --collect "XPlat Code Coverage"

Increase test verbosity

dotnet test MySolution.sln -c Release -v normal

Blame/hang diagnostics

dotnet test MySolution.sln -c Release --blame

Run a specific test by name

dotnet test MySolution.sln -c Release --filter "Name=MySpecificTest"

### C) Publish (ASP.NET core scenarios)

Publish (Release, framework-dependent)

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release

Publish to a specific directory

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:PublishDir=artifacts/publish/

Publish with RuntimeIdentifier (RID)

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=linux-x64

Self-contained publish

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=linux-x64 /p:SelfContained=true

Framework-dependent (explicit)

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:SelfContained=false

Single-file publish

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=win-x64 /p:PublishSingleFile=true

ReadyToRun publish

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:PublishReadyToRun=true

Trim publish (use with care)

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:PublishTrimmed=true

Single-file + trim (advanced)

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=linux-x64 /p:PublishSingleFile=true /p:PublishTrimmed=true

Stamp environment property (pattern; app must use it)

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:EnvironmentName=Production

Publish with version stamping

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:Version=1.2.3

Publish with explicit TargetFramework (multi-TFM projects)

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:TargetFramework=net8.0

Publish with CI properties

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:ContinuousIntegrationBuild=true /p:Deterministic=true

Publish: RID + self-contained + output

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=linux-x64 /p:SelfContained=true /p:PublishDir=artifacts/publish/linux-x64/

### D) Pack / NuGet / Versioning

Pack a library

dotnet msbuild src/MyLib/MyLib.csproj /t:Pack /p:Configuration=Release

Pack to a custom output path

dotnet msbuild src/MyLib/MyLib.csproj /t:Pack /p:Configuration=Release /p:PackageOutputPath=artifacts/nuget/

Pack with version

dotnet msbuild src/MyLib/MyLib.csproj /t:Pack /p:Configuration=Release /p:Version=1.2.3

Set AssemblyVersion / FileVersion

dotnet msbuild src/MyLib/MyLib.csproj /t:Build /p:Configuration=Release /p:AssemblyVersion=1.2.0.0 /p:FileVersion=1.2.3.0

InformationalVersion (commit metadata)

dotnet msbuild src/MyLib/MyLib.csproj /t:Build /p:Configuration=Release /p:InformationalVersion=1.2.3+sha.abcdef

Restore generating packages.lock.json

dotnet msbuild MySolution.sln /t:Restore /p:RestorePackagesWithLockFile=true

Restore locked mode (fail if lock changes)

dotnet msbuild MySolution.sln /t:Restore /p:RestoreLockedMode=true

Restore using a custom NuGet.config

dotnet msbuild MySolution.sln /t:Restore /p:RestoreConfigFile=NuGet.config

Restore with custom packages folder (CI cache)

dotnet msbuild MySolution.sln /t:Restore /p:RestorePackagesPath=artifacts/nuget-packages

### E) Diagnostics / Troubleshooting

Binary log (binlog) — best first step

dotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /bl

Binlog with specific path

dotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /bl:artifacts/logs/build.binlog

Verbosity: detailed

dotnet msbuild MySolution.sln /t:Build /v:detailed

Verbosity: diagnostic (only when needed)

dotnet msbuild MySolution.sln /t:Build /v:diag

File logger (text log)

dotnet msbuild MySolution.sln /t:Build /fl /flp:logfile=artifacts/logs/build.log;verbosity=normal

Console logger summary + performance

dotnet msbuild MySolution.sln /t:Build /clp:Summary;PerformanceSummary

Preprocess project (expanded after imports)

dotnet msbuild src/MyWeb/MyWeb.csproj /pp:artifacts/logs/preprocessed.xml

Graph build for solutions

dotnet msbuild MySolution.sln /t:Build /graphBuild /p:Configuration=Release

Run a single target explicitly (example: Clean)

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Clean /p:Configuration=Release

Show command lines (helps reproduce compiler invocation)

dotnet msbuild MySolution.sln /t:Build /m /v:minimal /clp:ShowCommandLine

Disable node reuse (CI stability)

dotnet msbuild MySolution.sln /t:Build /nr:false /p:Configuration=Release

Limit parallelism

dotnet msbuild MySolution.sln /t:Build /m:4 /p:Configuration=Release

### F) Advanced build controls

Generic custom property pattern

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:Configuration=Release /p:MyCustomProperty=Value

Override restore sources (quick feed test)

dotnet msbuild MySolution.sln /t:Restore /p:RestoreSources="https://api.nuget.org/v3/index.json;https://myfeed/v3/index.json"

Disable implicit restore (full control)

dotnet msbuild MySolution.sln /t:Build /p:Restore=false /p:BuildProjectReferences=true

Build without project references (debugging)

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:BuildProjectReferences=false

Publish using apphost (common for exe-style hosting)

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=linux-x64 /p:SelfContained=true /p:UseAppHost=true

Publish without apphost (edge cases)

dotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:UseAppHost=false

Restore with interactive auth (private feeds)

dotnet msbuild MySolution.sln /t:Restore /p:NuGetInteractive=true

Override MSBuild SDKs path (rare edge cases)

dotnet msbuild MySolution.sln /t:Build /p:MSBuildSDKsPath=/path/to/sdks

### G) msbuild.exe variants (Windows / VS Build Tools)

Build solution with msbuild.exe

msbuild MySolution.sln /t:Build /p:Configuration=Release /m

Restore with msbuild.exe

msbuild MySolution.sln /t:Restore

Publish with msbuild.exe

msbuild src\\MyWeb\\MyWeb.csproj /t:Publish /p:Configuration=Release /p:PublishDir=artifacts\\publish\\

Binlog with msbuild.exe

msbuild MySolution.sln /t:Build /p:Configuration=Release /bl:artifacts\\logs\\msbuild.binlog

Preprocess with msbuild.exe

msbuild src\\MyWeb\\MyWeb.csproj /pp:artifacts\\logs\\preprocessed.xml

### How to use this skill

When you describe a goal (e.g., “Publish linux-x64 self-contained single-file”), the skill should output:

the top 3 relevant commands from this list,
the few MSBuild properties that matter most,
and one diagnostic command (usually /bl) to capture a binlog if something fails.

### Caveats

Trim/ReadyToRun/SingleFile can have app-specific implications.
For build issues: rerun with /bl and inspect with MSBuild Structured Log Viewer.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: TheCyberCore
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-05T06:05:32.470Z
- Expires at: 2026-05-12T06:05:32.470Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/msbuild)
- [Send to Agent page](https://openagent3.xyz/skills/msbuild/agent)
- [JSON manifest](https://openagent3.xyz/skills/msbuild/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/msbuild/agent.md)
- [Download page](https://openagent3.xyz/downloads/msbuild)