{
  "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": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/msbuild",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=msbuild",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "manifest.json",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/msbuild",
    "agentPageUrl": "https://openagent3.xyz/skills/msbuild/agent",
    "manifestUrl": "https://openagent3.xyz/skills/msbuild/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/msbuild/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Purpose",
        "body": "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."
      },
      {
        "title": "Typical ASP.NET Developer Workflow (why these commands are prioritized)",
        "body": "A typical ASP.NET CLI workflow:\n\nRestore dependencies (often locked mode in CI)\nBuild quickly (Debug) and reliably (Release)\nTest repeatedly (filters, logs, results dirs, no-build/no-restore in CI)\nPublish artifacts (RID, self-contained, single-file, trimming, ready-to-run)\nPackage libraries (Pack), versioning\nDiagnose build issues (binlog, verbosity, preprocess, graph build)\nCI hardening (determinism, CI flags, node reuse, parallelism, reproducibility)\n\nRanking reflects frequency + impact in that flow."
      },
      {
        "title": "Conventions",
        "body": "Prefer cross-platform: dotnet msbuild\nOn Windows with VS Build Tools you can swap to: msbuild\nTargets: /t:<Target>\nProperties: /p:Name=Value\nLogging: /v:<level>, /bl[:file], /fl, /pp\nMultiproc: /m[:n]\nNote: dotnet test is included because it is the practical test CLI (it invokes MSBuild under the hood)."
      },
      {
        "title": "Top 80 Commands (1 = most important)",
        "body": "Replace MySolution.sln / src/MyWeb/MyWeb.csproj / tests/... as needed."
      },
      {
        "title": "A) Restore / Build / Clean / Rebuild (daily)",
        "body": "Restore solution\n\ndotnet msbuild MySolution.sln /t:Restore\n\nBuild solution (Debug)\n\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Debug\n\nBuild solution (Release)\n\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release\n\nClean solution\n\ndotnet msbuild MySolution.sln /t:Clean /p:Configuration=Debug\n\nRebuild solution (Clean + Build)\n\ndotnet msbuild MySolution.sln /t:Rebuild /p:Configuration=Release\n\nRestore + Build in one call\n\ndotnet msbuild MySolution.sln /restore /t:Build /p:Configuration=Debug\n\nBuild without restore (CI-friendly)\n\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:Restore=false\n\nParallel build (max CPU)\n\ndotnet msbuild MySolution.sln /t:Build /m /p:Configuration=Release\n\nQuiet-ish CI output\n\ndotnet msbuild MySolution.sln /t:Build /nologo /v:minimal /p:Configuration=Release\n\nBuild a single project\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:Configuration=Debug\n\nSet Platform explicitly\n\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:Platform=\"Any CPU\"\n\nTreat warnings as errors\n\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:TreatWarningsAsErrors=true\n\nDeterministic build\n\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:Deterministic=true\n\nCI build mode (SourceLink/versioning behavior)\n\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:ContinuousIntegrationBuild=true\n\nDisable incremental up-to-date checks (force build behavior)\n\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:DisableFastUpToDateCheck=true\n\nBuild with defined constants\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:Configuration=Debug /p:DefineConstants=\"TRACE;DEBUG;MYFLAG\"\n\nSet OutputPath (ad-hoc artifacts)\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:Configuration=Release /p:OutputPath=artifacts/bin/\n\nSet BaseIntermediateOutputPath (obj isolation / CI caching)\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:Configuration=Release /p:BaseIntermediateOutputPath=artifacts/obj/\n\nDisable shared compilation (debug odd build behavior)\n\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Debug /p:UseSharedCompilation=false\n\nShow MSBuild version\n\ndotnet msbuild -version"
      },
      {
        "title": "B) Tests (practical CLI; MSBuild-based)",
        "body": "Run tests (solution)\n\ndotnet test MySolution.sln -c Release\n\nTests without build\n\ndotnet test MySolution.sln -c Release --no-build\n\nTests without restore\n\ndotnet test MySolution.sln -c Release --no-restore\n\nTest a single test project\n\ndotnet test tests/MyWeb.Tests/MyWeb.Tests.csproj -c Debug\n\nTest filter by fully qualified name\n\ndotnet test MySolution.sln -c Release --filter \"FullyQualifiedName~MyNamespace\"\n\nTest filter by trait/category (example)\n\ndotnet test MySolution.sln -c Release --filter \"TestCategory=Integration\"\n\nTRX logger\n\ndotnet test MySolution.sln -c Release --logger \"trx\"\n\nResults directory\n\ndotnet test MySolution.sln -c Release --results-directory artifacts/testresults\n\nCollect coverage (cross-platform collector)\n\ndotnet test MySolution.sln -c Release --collect \"XPlat Code Coverage\"\n\nIncrease test verbosity\n\ndotnet test MySolution.sln -c Release -v normal\n\nBlame/hang diagnostics\n\ndotnet test MySolution.sln -c Release --blame\n\nRun a specific test by name\n\ndotnet test MySolution.sln -c Release --filter \"Name=MySpecificTest\""
      },
      {
        "title": "C) Publish (ASP.NET core scenarios)",
        "body": "Publish (Release, framework-dependent)\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release\n\nPublish to a specific directory\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:PublishDir=artifacts/publish/\n\nPublish with RuntimeIdentifier (RID)\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=linux-x64\n\nSelf-contained publish\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=linux-x64 /p:SelfContained=true\n\nFramework-dependent (explicit)\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:SelfContained=false\n\nSingle-file publish\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=win-x64 /p:PublishSingleFile=true\n\nReadyToRun publish\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:PublishReadyToRun=true\n\nTrim publish (use with care)\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:PublishTrimmed=true\n\nSingle-file + trim (advanced)\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=linux-x64 /p:PublishSingleFile=true /p:PublishTrimmed=true\n\nStamp environment property (pattern; app must use it)\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:EnvironmentName=Production\n\nPublish with version stamping\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:Version=1.2.3\n\nPublish with explicit TargetFramework (multi-TFM projects)\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:TargetFramework=net8.0\n\nPublish with CI properties\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:ContinuousIntegrationBuild=true /p:Deterministic=true\n\nPublish: RID + self-contained + output\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=linux-x64 /p:SelfContained=true /p:PublishDir=artifacts/publish/linux-x64/"
      },
      {
        "title": "D) Pack / NuGet / Versioning",
        "body": "Pack a library\n\ndotnet msbuild src/MyLib/MyLib.csproj /t:Pack /p:Configuration=Release\n\nPack to a custom output path\n\ndotnet msbuild src/MyLib/MyLib.csproj /t:Pack /p:Configuration=Release /p:PackageOutputPath=artifacts/nuget/\n\nPack with version\n\ndotnet msbuild src/MyLib/MyLib.csproj /t:Pack /p:Configuration=Release /p:Version=1.2.3\n\nSet AssemblyVersion / FileVersion\n\ndotnet msbuild src/MyLib/MyLib.csproj /t:Build /p:Configuration=Release /p:AssemblyVersion=1.2.0.0 /p:FileVersion=1.2.3.0\n\nInformationalVersion (commit metadata)\n\ndotnet msbuild src/MyLib/MyLib.csproj /t:Build /p:Configuration=Release /p:InformationalVersion=1.2.3+sha.abcdef\n\nRestore generating packages.lock.json\n\ndotnet msbuild MySolution.sln /t:Restore /p:RestorePackagesWithLockFile=true\n\nRestore locked mode (fail if lock changes)\n\ndotnet msbuild MySolution.sln /t:Restore /p:RestoreLockedMode=true\n\nRestore using a custom NuGet.config\n\ndotnet msbuild MySolution.sln /t:Restore /p:RestoreConfigFile=NuGet.config\n\nRestore with custom packages folder (CI cache)\n\ndotnet msbuild MySolution.sln /t:Restore /p:RestorePackagesPath=artifacts/nuget-packages"
      },
      {
        "title": "E) Diagnostics / Troubleshooting",
        "body": "Binary log (binlog) — best first step\n\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /bl\n\nBinlog with specific path\n\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /bl:artifacts/logs/build.binlog\n\nVerbosity: detailed\n\ndotnet msbuild MySolution.sln /t:Build /v:detailed\n\nVerbosity: diagnostic (only when needed)\n\ndotnet msbuild MySolution.sln /t:Build /v:diag\n\nFile logger (text log)\n\ndotnet msbuild MySolution.sln /t:Build /fl /flp:logfile=artifacts/logs/build.log;verbosity=normal\n\nConsole logger summary + performance\n\ndotnet msbuild MySolution.sln /t:Build /clp:Summary;PerformanceSummary\n\nPreprocess project (expanded after imports)\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /pp:artifacts/logs/preprocessed.xml\n\nGraph build for solutions\n\ndotnet msbuild MySolution.sln /t:Build /graphBuild /p:Configuration=Release\n\nRun a single target explicitly (example: Clean)\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Clean /p:Configuration=Release\n\nShow command lines (helps reproduce compiler invocation)\n\ndotnet msbuild MySolution.sln /t:Build /m /v:minimal /clp:ShowCommandLine\n\nDisable node reuse (CI stability)\n\ndotnet msbuild MySolution.sln /t:Build /nr:false /p:Configuration=Release\n\nLimit parallelism\n\ndotnet msbuild MySolution.sln /t:Build /m:4 /p:Configuration=Release"
      },
      {
        "title": "F) Advanced build controls",
        "body": "Generic custom property pattern\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:Configuration=Release /p:MyCustomProperty=Value\n\nOverride restore sources (quick feed test)\n\ndotnet msbuild MySolution.sln /t:Restore /p:RestoreSources=\"https://api.nuget.org/v3/index.json;https://myfeed/v3/index.json\"\n\nDisable implicit restore (full control)\n\ndotnet msbuild MySolution.sln /t:Build /p:Restore=false /p:BuildProjectReferences=true\n\nBuild without project references (debugging)\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:BuildProjectReferences=false\n\nPublish using apphost (common for exe-style hosting)\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=linux-x64 /p:SelfContained=true /p:UseAppHost=true\n\nPublish without apphost (edge cases)\n\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:UseAppHost=false\n\nRestore with interactive auth (private feeds)\n\ndotnet msbuild MySolution.sln /t:Restore /p:NuGetInteractive=true\n\nOverride MSBuild SDKs path (rare edge cases)\n\ndotnet msbuild MySolution.sln /t:Build /p:MSBuildSDKsPath=/path/to/sdks"
      },
      {
        "title": "G) msbuild.exe variants (Windows / VS Build Tools)",
        "body": "Build solution with msbuild.exe\n\nmsbuild MySolution.sln /t:Build /p:Configuration=Release /m\n\nRestore with msbuild.exe\n\nmsbuild MySolution.sln /t:Restore\n\nPublish with msbuild.exe\n\nmsbuild src\\MyWeb\\MyWeb.csproj /t:Publish /p:Configuration=Release /p:PublishDir=artifacts\\publish\\\n\nBinlog with msbuild.exe\n\nmsbuild MySolution.sln /t:Build /p:Configuration=Release /bl:artifacts\\logs\\msbuild.binlog\n\nPreprocess with msbuild.exe\n\nmsbuild src\\MyWeb\\MyWeb.csproj /pp:artifacts\\logs\\preprocessed.xml"
      },
      {
        "title": "How to use this skill",
        "body": "When you describe a goal (e.g., “Publish linux-x64 self-contained single-file”), the skill should output:\n\nthe top 3 relevant commands from this list,\nthe few MSBuild properties that matter most,\nand one diagnostic command (usually /bl) to capture a binlog if something fails."
      },
      {
        "title": "Caveats",
        "body": "Trim/ReadyToRun/SingleFile can have app-specific implications.\nFor build issues: rerun with /bl and inspect with MSBuild Structured Log Viewer."
      }
    ],
    "body": "Skill: Top 80 MSBuild Commands for .NET / ASP.NET (CLI)\nPurpose\n\nThis 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.\n\nTypical ASP.NET Developer Workflow (why these commands are prioritized)\n\nA typical ASP.NET CLI workflow:\n\nRestore dependencies (often locked mode in CI)\nBuild quickly (Debug) and reliably (Release)\nTest repeatedly (filters, logs, results dirs, no-build/no-restore in CI)\nPublish artifacts (RID, self-contained, single-file, trimming, ready-to-run)\nPackage libraries (Pack), versioning\nDiagnose build issues (binlog, verbosity, preprocess, graph build)\nCI hardening (determinism, CI flags, node reuse, parallelism, reproducibility)\n\nRanking reflects frequency + impact in that flow.\n\nConventions\nPrefer cross-platform: dotnet msbuild\nOn Windows with VS Build Tools you can swap to: msbuild\nTargets: /t:<Target>\nProperties: /p:Name=Value\nLogging: /v:<level>, /bl[:file], /fl, /pp\nMultiproc: /m[:n]\nNote: dotnet test is included because it is the practical test CLI (it invokes MSBuild under the hood).\nTop 80 Commands (1 = most important)\n\nReplace MySolution.sln / src/MyWeb/MyWeb.csproj / tests/... as needed.\n\nA) Restore / Build / Clean / Rebuild (daily)\nRestore solution\ndotnet msbuild MySolution.sln /t:Restore\n\nBuild solution (Debug)\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Debug\n\nBuild solution (Release)\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release\n\nClean solution\ndotnet msbuild MySolution.sln /t:Clean /p:Configuration=Debug\n\nRebuild solution (Clean + Build)\ndotnet msbuild MySolution.sln /t:Rebuild /p:Configuration=Release\n\nRestore + Build in one call\ndotnet msbuild MySolution.sln /restore /t:Build /p:Configuration=Debug\n\nBuild without restore (CI-friendly)\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:Restore=false\n\nParallel build (max CPU)\ndotnet msbuild MySolution.sln /t:Build /m /p:Configuration=Release\n\nQuiet-ish CI output\ndotnet msbuild MySolution.sln /t:Build /nologo /v:minimal /p:Configuration=Release\n\nBuild a single project\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:Configuration=Debug\n\nSet Platform explicitly\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:Platform=\"Any CPU\"\n\nTreat warnings as errors\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:TreatWarningsAsErrors=true\n\nDeterministic build\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:Deterministic=true\n\nCI build mode (SourceLink/versioning behavior)\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:ContinuousIntegrationBuild=true\n\nDisable incremental up-to-date checks (force build behavior)\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /p:DisableFastUpToDateCheck=true\n\nBuild with defined constants\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:Configuration=Debug /p:DefineConstants=\"TRACE;DEBUG;MYFLAG\"\n\nSet OutputPath (ad-hoc artifacts)\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:Configuration=Release /p:OutputPath=artifacts/bin/\n\nSet BaseIntermediateOutputPath (obj isolation / CI caching)\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:Configuration=Release /p:BaseIntermediateOutputPath=artifacts/obj/\n\nDisable shared compilation (debug odd build behavior)\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Debug /p:UseSharedCompilation=false\n\nShow MSBuild version\ndotnet msbuild -version\n\nB) Tests (practical CLI; MSBuild-based)\nRun tests (solution)\ndotnet test MySolution.sln -c Release\n\nTests without build\ndotnet test MySolution.sln -c Release --no-build\n\nTests without restore\ndotnet test MySolution.sln -c Release --no-restore\n\nTest a single test project\ndotnet test tests/MyWeb.Tests/MyWeb.Tests.csproj -c Debug\n\nTest filter by fully qualified name\ndotnet test MySolution.sln -c Release --filter \"FullyQualifiedName~MyNamespace\"\n\nTest filter by trait/category (example)\ndotnet test MySolution.sln -c Release --filter \"TestCategory=Integration\"\n\nTRX logger\ndotnet test MySolution.sln -c Release --logger \"trx\"\n\nResults directory\ndotnet test MySolution.sln -c Release --results-directory artifacts/testresults\n\nCollect coverage (cross-platform collector)\ndotnet test MySolution.sln -c Release --collect \"XPlat Code Coverage\"\n\nIncrease test verbosity\ndotnet test MySolution.sln -c Release -v normal\n\nBlame/hang diagnostics\ndotnet test MySolution.sln -c Release --blame\n\nRun a specific test by name\ndotnet test MySolution.sln -c Release --filter \"Name=MySpecificTest\"\n\nC) Publish (ASP.NET core scenarios)\nPublish (Release, framework-dependent)\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release\n\nPublish to a specific directory\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:PublishDir=artifacts/publish/\n\nPublish with RuntimeIdentifier (RID)\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=linux-x64\n\nSelf-contained publish\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=linux-x64 /p:SelfContained=true\n\nFramework-dependent (explicit)\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:SelfContained=false\n\nSingle-file publish\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=win-x64 /p:PublishSingleFile=true\n\nReadyToRun publish\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:PublishReadyToRun=true\n\nTrim publish (use with care)\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:PublishTrimmed=true\n\nSingle-file + trim (advanced)\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=linux-x64 /p:PublishSingleFile=true /p:PublishTrimmed=true\n\nStamp environment property (pattern; app must use it)\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:EnvironmentName=Production\n\nPublish with version stamping\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:Version=1.2.3\n\nPublish with explicit TargetFramework (multi-TFM projects)\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:TargetFramework=net8.0\n\nPublish with CI properties\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:ContinuousIntegrationBuild=true /p:Deterministic=true\n\nPublish: RID + self-contained + output\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=linux-x64 /p:SelfContained=true /p:PublishDir=artifacts/publish/linux-x64/\n\nD) Pack / NuGet / Versioning\nPack a library\ndotnet msbuild src/MyLib/MyLib.csproj /t:Pack /p:Configuration=Release\n\nPack to a custom output path\ndotnet msbuild src/MyLib/MyLib.csproj /t:Pack /p:Configuration=Release /p:PackageOutputPath=artifacts/nuget/\n\nPack with version\ndotnet msbuild src/MyLib/MyLib.csproj /t:Pack /p:Configuration=Release /p:Version=1.2.3\n\nSet AssemblyVersion / FileVersion\ndotnet msbuild src/MyLib/MyLib.csproj /t:Build /p:Configuration=Release /p:AssemblyVersion=1.2.0.0 /p:FileVersion=1.2.3.0\n\nInformationalVersion (commit metadata)\ndotnet msbuild src/MyLib/MyLib.csproj /t:Build /p:Configuration=Release /p:InformationalVersion=1.2.3+sha.abcdef\n\nRestore generating packages.lock.json\ndotnet msbuild MySolution.sln /t:Restore /p:RestorePackagesWithLockFile=true\n\nRestore locked mode (fail if lock changes)\ndotnet msbuild MySolution.sln /t:Restore /p:RestoreLockedMode=true\n\nRestore using a custom NuGet.config\ndotnet msbuild MySolution.sln /t:Restore /p:RestoreConfigFile=NuGet.config\n\nRestore with custom packages folder (CI cache)\ndotnet msbuild MySolution.sln /t:Restore /p:RestorePackagesPath=artifacts/nuget-packages\n\nE) Diagnostics / Troubleshooting\nBinary log (binlog) — best first step\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /bl\n\nBinlog with specific path\ndotnet msbuild MySolution.sln /t:Build /p:Configuration=Release /bl:artifacts/logs/build.binlog\n\nVerbosity: detailed\ndotnet msbuild MySolution.sln /t:Build /v:detailed\n\nVerbosity: diagnostic (only when needed)\ndotnet msbuild MySolution.sln /t:Build /v:diag\n\nFile logger (text log)\ndotnet msbuild MySolution.sln /t:Build /fl /flp:logfile=artifacts/logs/build.log;verbosity=normal\n\nConsole logger summary + performance\ndotnet msbuild MySolution.sln /t:Build /clp:Summary;PerformanceSummary\n\nPreprocess project (expanded after imports)\ndotnet msbuild src/MyWeb/MyWeb.csproj /pp:artifacts/logs/preprocessed.xml\n\nGraph build for solutions\ndotnet msbuild MySolution.sln /t:Build /graphBuild /p:Configuration=Release\n\nRun a single target explicitly (example: Clean)\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Clean /p:Configuration=Release\n\nShow command lines (helps reproduce compiler invocation)\ndotnet msbuild MySolution.sln /t:Build /m /v:minimal /clp:ShowCommandLine\n\nDisable node reuse (CI stability)\ndotnet msbuild MySolution.sln /t:Build /nr:false /p:Configuration=Release\n\nLimit parallelism\ndotnet msbuild MySolution.sln /t:Build /m:4 /p:Configuration=Release\n\nF) Advanced build controls\nGeneric custom property pattern\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:Configuration=Release /p:MyCustomProperty=Value\n\nOverride restore sources (quick feed test)\ndotnet msbuild MySolution.sln /t:Restore /p:RestoreSources=\"https://api.nuget.org/v3/index.json;https://myfeed/v3/index.json\"\n\nDisable implicit restore (full control)\ndotnet msbuild MySolution.sln /t:Build /p:Restore=false /p:BuildProjectReferences=true\n\nBuild without project references (debugging)\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Build /p:BuildProjectReferences=false\n\nPublish using apphost (common for exe-style hosting)\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=linux-x64 /p:SelfContained=true /p:UseAppHost=true\n\nPublish without apphost (edge cases)\ndotnet msbuild src/MyWeb/MyWeb.csproj /t:Publish /p:Configuration=Release /p:UseAppHost=false\n\nRestore with interactive auth (private feeds)\ndotnet msbuild MySolution.sln /t:Restore /p:NuGetInteractive=true\n\nOverride MSBuild SDKs path (rare edge cases)\ndotnet msbuild MySolution.sln /t:Build /p:MSBuildSDKsPath=/path/to/sdks\n\nG) msbuild.exe variants (Windows / VS Build Tools)\nBuild solution with msbuild.exe\nmsbuild MySolution.sln /t:Build /p:Configuration=Release /m\n\nRestore with msbuild.exe\nmsbuild MySolution.sln /t:Restore\n\nPublish with msbuild.exe\nmsbuild src\\MyWeb\\MyWeb.csproj /t:Publish /p:Configuration=Release /p:PublishDir=artifacts\\publish\\\n\nBinlog with msbuild.exe\nmsbuild MySolution.sln /t:Build /p:Configuration=Release /bl:artifacts\\logs\\msbuild.binlog\n\nPreprocess with msbuild.exe\nmsbuild src\\MyWeb\\MyWeb.csproj /pp:artifacts\\logs\\preprocessed.xml\n\nHow to use this skill\n\nWhen you describe a goal (e.g., “Publish linux-x64 self-contained single-file”), the skill should output:\n\nthe top 3 relevant commands from this list,\nthe few MSBuild properties that matter most,\nand one diagnostic command (usually /bl) to capture a binlog if something fails.\nCaveats\nTrim/ReadyToRun/SingleFile can have app-specific implications.\nFor build issues: rerun with /bl and inspect with MSBuild Structured Log Viewer."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/TheCyberCore/msbuild",
    "publisherUrl": "https://clawhub.ai/TheCyberCore/msbuild",
    "owner": "TheCyberCore",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "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"
  }
}