[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EKCHTKSWW351F5XZRWWJP6":3,"skill-same:01M7EKCHTKSWW351F5XZRWWJP6":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":14,"repositoryHtmlUrl":35,"repositoryHomepageUrl":35,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":37,"install":38,"resources":51},"01M7EKCHTKSWW351F5XZRWWJP6","build-perf-baseline",null,"'Establish build performance baselines and apply systematic optimization techniques. USE FOR: diagnosing slow builds, establishing before\u002Fafter measurements (cold, warm, no-op scenarios), applying optimization strategies like static graph builds, artifacts out","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fcloud\u002Fbuild-perf-baseline\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: build-perf-baseline\ndescription: \"'Establish build performance baselines and apply systematic optimization techniques. USE FOR: diagnosing slow builds, establishing before\u002Fafter measurements (cold, warm, no-op scenarios), applying optimization strategies like static graph builds, artifacts out\"\ncategory: cloud\nversion: 1.0.0\ndisable-model-invocation: false\nrisk: low\nsource:\n  repository: \"microsoft\u002Fskills\"\n  commit: \"8f3b1a2c\"\n  path: \"plugins\u002Fdotnet-msbuild\u002Fskills\u002Fbuild-perf-baseline\u002FSKILL.md\"\n  license: \"MIT\"\n  imported_at: \"2026-09-20\"\n---\n# Build Performance Baseline & Optimization\n\n## Overview\n\nBefore optimizing a build, you need a **baseline**. Without measurements, optimization is guesswork. This skill covers how to establish baselines and apply systematic optimization techniques.\n\n**Related skills:**\n- `build-perf-diagnostics` — binlog-based bottleneck identification\n- `incremental-build` — Inputs\u002FOutputs and up-to-date checks\n- `build-parallelism` — parallel and graph build tuning\n- `eval-performance` — glob and import chain optimization\n\n---\n\n## Step 1: Establish a Performance Baseline\n\nMeasure three scenarios to understand where time is spent:\n\n### Cold Build (First Build)\n\nNo previous build output exists. Measures the full end-to-end time including restore, compilation, and all targets.\n\n```bash\n# Clean everything first\ndotnet clean\n# Remove bin\u002Fobj to truly start fresh\nGet-ChildItem -Recurse -Directory -Include bin,obj | Remove-Item -Recurse -Force\n# OR on Linux\u002FmacOS:\n# find . -type d \\( -name bin -o -name obj \\) -exec rm -rf {} +\n\n# Measure cold build\ndotnet build \u002Fbl:cold-build.binlog -m\n```\n\n### Warm Build (Incremental Build)\n\nBuild output exists, some files have changed. Measures how well incremental build works.\n\n```bash\n# Build once to populate outputs\ndotnet build -m\n\n# Make a small change (touch one .cs file)\n# Then rebuild\ndotnet build \u002Fbl:warm-build.binlog -m\n```\n\n### No-Op Build (Nothing Changed)\n\nBuild output exists, nothing has changed. This should be nearly instant. If it's slow, incremental build is broken.\n\n```bash\n# Build once to populate outputs\ndotnet build -m\n\n# Rebuild immediately without changes\ndotnet build \u002Fbl:noop-build.binlog -m\n```\n\n### What Good Looks Like\n\n| Scenario | Expected Behavior |\n|----------|------------------|\n| Cold build | Full compilation, all targets run. This is your absolute baseline |\n| Warm build | Only changed projects recompile. Time proportional to change scope |\n| No-op build | \u003C 5 seconds for small repos, \u003C 30 seconds for large repos. All compilation targets should report \"Skipping target — all outputs up-to-date\" |\n\n**Red flags:**\n- No-op build > 30 seconds → incremental build is broken (see `incremental-build` skill)\n- Warm build recompiles everything → project dependency chain forces full rebuild\n- Cold build has long restore → NuGet cache issues\n\n### Recording Baselines\n\nRecord baselines in a structured way before and after optimization:\n\n```\n| Scenario    | Before  | After   | Improvement |\n|-------------|---------|---------|-------------|\n| Cold build  | 2m 15s  |         |             |\n| Warm build  | 1m 40s  |         |             |\n| No-op build | 45s     |         |             |\n```\n\n---\n\n## Step 2: Artifacts Output Layout\n\nThe `UseArtifactsOutput` feature (introduced in .NET 8) changes the output directory structure to avoid bin\u002Fobj clash issues and enable better caching.\n\n### Enabling Artifacts Output\n\n```xml\n\u003C!-- Directory.Build.props -->\n\u003CPropertyGroup>\n  \u003CUseArtifactsOutput>true\u003C\u002FUseArtifactsOutput>\n\u003C\u002FPropertyGroup>\n```\n\n### Before vs After\n\n```\n# Traditional layout (before)\nsrc\u002F\n  MyLib\u002F\n    bin\u002FDebug\u002Fnet8.0\u002FMyLib.dll\n    obj\u002FDebug\u002Fnet8.0\u002F...\n  MyApp\u002F\n    bin\u002FDebug\u002Fnet8.0\u002FMyApp.dll\n\n# Artifacts layout (after)\nartifacts\u002F\n  bin\u002FMyLib\u002Fdebug\u002FMyLib.dll\n  bin\u002FMyApp\u002Fdebug\u002FMyApp.dll\n  obj\u002FMyLib\u002Fdebug\u002F...\n  obj\u002FMyApp\u002Fdebug\u002F...\n```\n\n### Benefits\n\n- **No bin\u002Fobj clash**: Each project+configuration gets a unique path automatically\n- **Easier to cache**: Single `artifacts\u002F` directory to cache\u002Frestore in CI\n- **Cleaner .gitignore**: Just ignore `artifacts\u002F`\n- **Multi-targeting safe**: Each TFM gets its own subdirectory\n\n### Customizing\n\n```xml\n\u003C!-- Change the artifacts root -->\n\u003CPropertyGroup>\n  \u003CArtifactsPath>$(MSBuildThisFileDirectory)output\u003C\u002FArtifactsPath>\n\u003C\u002FPropertyGroup>\n```\n\n---\n\n## Step 3: Deterministic Builds\n\nDeterministic builds produce byte-for-byte identical output given the same inputs. This is essential for build caching and reproducibility.\n\n### Enabling Deterministic Builds\n\n```xml\n\u003C!-- Directory.Build.props -->\n\u003CPropertyGroup>\n  \u003C!-- Enabled by default in .NET SDK projects since SDK 2.0+ -->\n  \u003CDeterministic>true\u003C\u002FDeterministic>\n\n  \u003C!-- For full reproducibility, also set: -->\n  \u003CContinuousIntegrationBuild Condition=\"'$(CI)' == 'true'\">true\u003C\u002FContinuousIntegrationBuild>\n\u003C\u002FPropertyGroup>\n```\n\n### What Deterministic Affects\n\n- Removes timestamps from PE headers\n- Uses consistent file paths in PDBs\n- Produces identical output for identical input\n\n### Why It Matters for Performance\n\n- **Build caching**: If outputs are deterministic, you can cache and reuse them across builds and machines\n- **CI optimization**: Skip rebuilding unchanged projects by comparing inputs\n- **Distributed builds**: Safe to cache compilation results in shared storage\n\n---\n\n## Step 4: Dependency Graph Trimming\n\nReducing unnecessary project references shortens the critical path and reduces what gets built.\n\n### Audit the Dependency Graph\n\n```bash\n# Visualize the dependency graph\ndotnet build \u002Fbl:graph.binlog\n\n# In the binlog, check project references and build times\n# Look for projects that are referenced but could be trimmed\n```\n\n### Techniques\n\n#### Remove Redundant Transitive References\n\n```xml\n\u003C!-- BAD: Utils is already referenced transitively via Core -->\n\u003CItemGroup>\n  \u003CProjectReference Include=\"..\\Core\\Core.csproj\" \u002F>\n  \u003CProjectReference Include=\"..\\Utils\\Utils.csproj\" \u002F>\n\u003C\u002FItemGroup>\n\n\u003C!-- GOOD: Let transitive references flow automatically -->\n\u003CItemGroup>\n  \u003CProjectReference Include=\"..\\Core\\Core.csproj\" \u002F>\n\u003C\u002FItemGroup>\n```\n\n#### Build-Order-Only References\n\nWhen you need a project to build before yours but don't need its assembly output:\n\n```xml\n\u003C!-- Only ensures build order, doesn't reference the output assembly -->\n\u003CProjectReference Include=\"..\\CodeGen\\CodeGen.csproj\"\n                  ReferenceOutputAssembly=\"false\" \u002F>\n```\n\n#### Prevent Transitive Flow\n\nWhen a dependency is an internal implementation detail that shouldn't flow to consumers:\n\n```xml\n\u003C!-- Don't expose this dependency transitively -->\n\u003CProjectReference Include=\"..\\InternalHelpers\\InternalHelpers.csproj\"\n                  PrivateAssets=\"all\" \u002F>\n```\n\n#### Disable Transitive Project References\n\nFor explicit-only dependency management (extreme measure for very large repos):\n\n```xml\n\u003CPropertyGroup>\n  \u003CDisableTransitiveProjectReferences>true\u003C\u002FDisableTransitiveProjectReferences>\n\u003C\u002FPropertyGroup>\n```\n\n**Caution**: This requires all dependencies to be listed explicitly. Only use in large repos where transitive closure is causing excessive rebuilds.\n\n---\n\n## Step 5: Static Graph Builds (`\u002Fgraph`)\n\nStatic graph mode evaluates the entire project graph before building, enabling better scheduling and isolation.\n\n### Enabling Graph Build\n\n```bash\n# Single invocation\ndotnet build \u002Fgraph\n\n# With binary log for analysis\ndotnet build \u002Fgraph \u002Fbl:graph-build.binlog\n```\n\n### Benefits\n\n- **Better parallelism**: MSBuild knows the full graph upfront and can schedule optimally\n- **Build isolation**: Each project builds in isolation (no cross-project state leakage)\n- **Caching potential**: With isolation, individual project results can be cached\n\n### When to Use\n\n| Scenario | Recommendation |\n|----------|---------------|\n| Large multi-project solution (20+ projects) | ✅ Try `\u002Fgraph` — may see significant parallelism gains |\n| Small solution (\u003C 5 projects) | ❌ Overhead of graph evaluation outweighs benefits |\n| CI builds | ✅ Graph builds are more predictable and parallelizable |\n| Local development | ⚠️ Test both — may or may not help depending on project structure |\n\n### Troubleshooting Graph Build\n\nGraph build requires that all `ProjectReference` items are statically determinable (no dynamic references computed in targets). If graph build fails:\n\n```\nerror MSB4260: Project reference \"...\" could not be resolved with static graph.\n```\n\n**Fix**: Ensure all `ProjectReference` items are declared in `\u003CItemGroup>` outside of targets (not dynamically computed inside `\u003CTarget>` blocks).\n\n---\n\n## Step 6: Parallel Build Tuning\n\n### MaxCpuCount\n\n```bash\n# Use all available cores (default in dotnet build)\ndotnet build -m\n\n# Specify explicit core count (useful for CI with shared agents)\ndotnet build -m:4\n\n# MSBuild.exe syntax\nmsbuild \u002Fm:8 MySolution.sln\n```\n\n### Identifying Parallelism Bottlenecks\n\nIn a binlog, look for:\n- **Long sequential chains**: Projects that must build one after another due to dependencies\n- **Uneven load**: Some build nodes idle while others are overloaded\n- **Single-project bottleneck**: One large project on the critical path that blocks everything\n\nUse `grep 'Target Performance Summary' -A 30 full.log` in binlog analysis to see build node utilization.\n\n### Reducing the Critical Path\n\nThe critical path is the longest chain of dependent projects. To shorten it:\n\n1. **Break large projects into smaller ones** that can build in parallel\n2. **Remove unnecessary ProjectReferences** (see Step 5)\n3. **Use `ReferenceOutputAssembly=\"false\"`** for build-order-only dependencies\n4. **Move shared code to a base library** that builds first, then parallelize consumers\n\n---\n\n## Step 7: Additional Quick Wins\n\n### Separate Restore from Build\n\n```bash\n# In CI, restore once then build without restore\ndotnet restore\ndotnet build --no-restore -m\ndotnet test --no-build\n```\n\n### Skip Unnecessary Targets\n\n```bash\n# Skip building documentation\ndotnet build \u002Fp:GenerateDocumentationFile=false\n\n# Skip analyzers during development (not for CI!)\ndotnet build \u002Fp:RunAnalyzers=false\n```\n\n### Use Project-Level Filtering\n\n```bash\n# Build only the project you're working on (and its dependencies)\ndotnet build src\u002FMyApp\u002FMyApp.csproj\n\n# Don't build the entire solution if you only need one project\n```\n\n### Binary Log for All Investigations\n\nAlways start with a binlog:\n```bash\ndotnet build \u002Fbl:perf.binlog -m\n```\n\nThen use the `build-perf-diagnostics` skill and binlog tools for systematic bottleneck identification.\n\n---\n\n## Optimization Decision Tree\n\n```\nIs your no-op build slow (> 10s per project)?\n├── YES → See `incremental-build` skill (fix Inputs\u002FOutputs)\n└── NO\n    Is your cold build slow?\n    ├── YES\n    │   Is restore slow?\n    │   ├── YES → Optimize NuGet restore (use lock files, configure local cache)\n    │   └── NO\n    │       Is compilation slow?\n    │       ├── YES\n    │       │   Are analyzers\u002Fgenerators slow?\n    │       │   ├── YES → See `build-perf-diagnostics` skill\n    │       │   └── NO → Check parallelism, graph build, critical path (this skill + `build-parallelism`)\n    │       └── NO → Check custom targets (binlog analysis via `build-perf-diagnostics`)\n    └── NO\n        Is your warm build slow?\n        ├── YES → Projects rebuilding unnecessarily → check `incremental-build` skill\n        └── NO → Build is healthy! Consider graph build or UseArtifactsOutput for further gains\n```\n","# Build Performance Baseline & Optimization\n\n## Overview\n\nBefore optimizing a build, you need a **baseline**. Without measurements, optimization is guesswork. This skill covers how to establish baselines and apply systematic optimization techniques.\n\n**Related skills:**\n- `build-perf-diagnostics` — binlog-based bottleneck identification\n- `incremental-build` — Inputs\u002FOutputs and up-to-date checks\n- `build-parallelism` — parallel and graph build tuning\n- `eval-performance` — glob and import chain optimization\n\n---\n\n## Step 1: Establish a Performance Baseline\n\nMeasure three scenarios to understand where time is spent:\n\n### Cold Build (First Build)\n\nNo previous build output exists. Measures the full end-to-end time including restore, compilation, and all targets.\n\n```bash\n# Clean everything first\ndotnet clean\n# Remove bin\u002Fobj to truly start fresh\nGet-ChildItem -Recurse -Directory -Include bin,obj | Remove-Item -Recurse -Force\n# OR on Linux\u002FmacOS:\n# find . -type d \\( -name bin -o -name obj \\) -exec rm -rf {} +\n\n# Measure cold build\ndotnet build \u002Fbl:cold-build.binlog -m\n```\n\n### Warm Build (Incremental Build)\n\nBuild output exists, some files have changed. Measures how well incremental build works.\n\n```bash\n# Build once to populate outputs\ndotnet build -m\n\n# Make a small change (touch one .cs file)\n# Then rebuild\ndotnet build \u002Fbl:warm-build.binlog -m\n```\n\n### No-Op Build (Nothing Changed)\n\nBuild output exists, nothing has changed. This should be nearly instant. If it's slow, incremental build is broken.\n\n```bash\n# Build once to populate outputs\ndotnet build -m\n\n# Rebuild immediately without changes\ndotnet build \u002Fbl:noop-build.binlog -m\n```\n\n### What Good Looks Like\n\n| Scenario | Expected Behavior |\n|----------|------------------|\n| Cold build | Full compilation, all targets run. This is your absolute baseline |\n| Warm build | Only changed projects recompile. Time proportional to change scope |\n| No-op build | \u003C 5 seconds for small repos, \u003C 30 seconds for large repos. All compilation targets should report \"Skipping target — all outputs up-to-date\" |\n\n**Red flags:**\n- No-op build > 30 seconds → incremental build is broken (see `incremental-build` skill)\n- Warm build recompiles everything → project dependency chain forces full rebuild\n- Cold build has long restore → NuGet cache issues\n\n### Recording Baselines\n\nRecord baselines in a structured way before and after optimization:\n\n```\n| Scenario    | Before  | After   | Improvement |\n|-------------|---------|---------|-------------|\n| Cold build  | 2m 15s  |         |             |\n| Warm build  | 1m 40s  |         |             |\n| No-op build | 45s     |         |             |\n```\n\n---\n\n## Step 2: Artifacts Output Layout\n\nThe `UseArtifactsOutput` feature (introduced in .NET 8) changes the output directory structure to avoid bin\u002Fobj clash issues and enable better caching.\n\n### Enabling Artifacts Output\n\n```xml\n\u003C!-- Directory.Build.props -->\n\u003CPropertyGroup>\n  \u003CUseArtifactsOutput>true\u003C\u002FUseArtifactsOutput>\n\u003C\u002FPropertyGroup>\n```\n\n### Before vs After\n\n```\n# Traditional layout (before)\nsrc\u002F\n  MyLib\u002F\n    bin\u002FDebug\u002Fnet8.0\u002FMyLib.dll\n    obj\u002FDebug\u002Fnet8.0\u002F...\n  MyApp\u002F\n    bin\u002FDebug\u002Fnet8.0\u002FMyApp.dll\n\n# Artifacts layout (after)\nartifacts\u002F\n  bin\u002FMyLib\u002Fdebug\u002FMyLib.dll\n  bin\u002FMyApp\u002Fdebug\u002FMyApp.dll\n  obj\u002FMyLib\u002Fdebug\u002F...\n  obj\u002FMyApp\u002Fdebug\u002F...\n```\n\n### Benefits\n\n- **No bin\u002Fobj clash**: Each project+configuration gets a unique path automatically\n- **Easier to cache**: Single `artifacts\u002F` directory to cache\u002Frestore in CI\n- **Cleaner .gitignore**: Just ignore `artifacts\u002F`\n- **Multi-targeting safe**: Each TFM gets its own subdirectory\n\n### Customizing\n\n```xml\n\u003C!-- Change the artifacts root -->\n\u003CPropertyGroup>\n  \u003CArtifactsPath>$(MSBuildThisFileDirectory)output\u003C\u002FArtifactsPath>\n\u003C\u002FPropertyGroup>\n```\n\n---\n\n## Step 3: Deterministic Builds\n\nDeterministic builds produce byte-for-byte identical output given the same inputs. This is essential for build caching and reproducibility.\n\n### Enabling Deterministic Builds\n\n```xml\n\u003C!-- Directory.Build.props -->\n\u003CPropertyGroup>\n  \u003C!-- Enabled by default in .NET SDK projects since SDK 2.0+ -->\n  \u003CDeterministic>true\u003C\u002FDeterministic>\n\n  \u003C!-- For full reproducibility, also set: -->\n  \u003CContinuousIntegrationBuild Condition=\"'$(CI)' == 'true'\">true\u003C\u002FContinuousIntegrationBuild>\n\u003C\u002FPropertyGroup>\n```\n\n### What Deterministic Affects\n\n- Removes timestamps from PE headers\n- Uses consistent file paths in PDBs\n- Produces identical output for identical input\n\n### Why It Matters for Performance\n\n- **Build caching**: If outputs are deterministic, you can cache and reuse them across builds and machines\n- **CI optimization**: Skip rebuilding unchanged projects by comparing inputs\n- **Distributed builds**: Safe to cache compilation results in shared storage\n\n---\n\n## Step 4: Dependency Graph Trimming\n\nReducing unnecessary project references shortens the critical path and reduces what gets built.\n\n### Audit the Dependency Graph\n\n```bash\n# Visualize the dependency graph\ndotnet build \u002Fbl:graph.binlog\n\n# In the binlog, check project references and build times\n# Look for projects that are referenced but could be trimmed\n```\n\n### Techniques\n\n#### Remove Redundant Transitive References\n\n```xml\n\u003C!-- BAD: Utils is already referenced transitively via Core -->\n\u003CItemGroup>\n  \u003CProjectReference Include=\"..\\Core\\Core.csproj\" \u002F>\n  \u003CProjectReference Include=\"..\\Utils\\Utils.csproj\" \u002F>\n\u003C\u002FItemGroup>\n\n\u003C!-- GOOD: Let transitive references flow automatically -->\n\u003CItemGroup>\n  \u003CProjectReference Include=\"..\\Core\\Core.csproj\" \u002F>\n\u003C\u002FItemGroup>\n```\n\n#### Build-Order-Only References\n\nWhen you need a project to build before yours but don't need its assembly output:\n\n```xml\n\u003C!-- Only ensures build order, doesn't reference the output assembly -->\n\u003CProjectReference Include=\"..\\CodeGen\\CodeGen.csproj\"\n                  ReferenceOutputAssembly=\"false\" \u002F>\n```\n\n#### Prevent Transitive Flow\n\nWhen a dependency is an internal implementation detail that shouldn't flow to consumers:\n\n```xml\n\u003C!-- Don't expose this dependency transitively -->\n\u003CProjectReference Include=\"..\\InternalHelpers\\InternalHelpers.csproj\"\n                  PrivateAssets=\"all\" \u002F>\n```\n\n#### Disable Transitive Project References\n\nFor explicit-only dependency management (extreme measure for very large repos):\n\n```xml\n\u003CPropertyGroup>\n  \u003CDisableTransitiveProjectReferences>true\u003C\u002FDisableTransitiveProjectReferences>\n\u003C\u002FPropertyGroup>\n```\n\n**Caution**: This requires all dependencies to be listed explicitly. Only use in large repos where transitive closure is causing excessive rebuilds.\n\n---\n\n## Step 5: Static Graph Builds (`\u002Fgraph`)\n\nStatic graph mode evaluates the entire project graph before building, enabling better scheduling and isolation.\n\n### Enabling Graph Build\n\n```bash\n# Single invocation\ndotnet build \u002Fgraph\n\n# With binary log for analysis\ndotnet build \u002Fgraph \u002Fbl:graph-build.binlog\n```\n\n### Benefits\n\n- **Better parallelism**: MSBuild knows the full graph upfront and can schedule optimally\n- **Build isolation**: Each project builds in isolation (no cross-project state leakage)\n- **Caching potential**: With isolation, individual project results can be cached\n\n### When to Use\n\n| Scenario | Recommendation |\n|----------|---------------|\n| Large multi-project solution (20+ projects) | ✅ Try `\u002Fgraph` — may see significant parallelism gains |\n| Small solution (\u003C 5 projects) | ❌ Overhead of graph evaluation outweighs benefits |\n| CI builds | ✅ Graph builds are more predictable and parallelizable |\n| Local development | ⚠️ Test both — may or may not help depending on project structure |\n\n### Troubleshooting Graph Build\n\nGraph build requires that all `ProjectReference` items are statically determinable (no dynamic references computed in targets). If graph build fails:\n\n```\nerror MSB4260: Project reference \"...\" could not be resolved with static graph.\n```\n\n**Fix**: Ensure all `ProjectReference` items are declared in `\u003CItemGroup>` outside of targets (not dynamically computed inside `\u003CTarget>` blocks).\n\n---\n\n## Step 6: Parallel Build Tuning\n\n### MaxCpuCount\n\n```bash\n# Use all available cores (default in dotnet build)\ndotnet build -m\n\n# Specify explicit core count (useful for CI with shared agents)\ndotnet build -m:4\n\n# MSBuild.exe syntax\nmsbuild \u002Fm:8 MySolution.sln\n```\n\n### Identifying Parallelism Bottlenecks\n\nIn a binlog, look for:\n- **Long sequential chains**: Projects that must build one after another due to dependencies\n- **Uneven load**: Some build nodes idle while others are overloaded\n- **Single-project bottleneck**: One large project on the critical path that blocks everything\n\nUse `grep 'Target Performance Summary' -A 30 full.log` in binlog analysis to see build node utilization.\n\n### Reducing the Critical Path\n\nThe critical path is the longest chain of dependent projects. To shorten it:\n\n1. **Break large projects into smaller ones** that can build in parallel\n2. **Remove unnecessary ProjectReferences** (see Step 5)\n3. **Use `ReferenceOutputAssembly=\"false\"`** for build-order-only dependencies\n4. **Move shared code to a base library** that builds first, then parallelize consumers\n\n---\n\n## Step 7: Additional Quick Wins\n\n### Separate Restore from Build\n\n```bash\n# In CI, restore once then build without restore\ndotnet restore\ndotnet build --no-restore -m\ndotnet test --no-build\n```\n\n### Skip Unnecessary Targets\n\n```bash\n# Skip building documentation\ndotnet build \u002Fp:GenerateDocumentationFile=false\n\n# Skip analyzers during development (not for CI!)\ndotnet build \u002Fp:RunAnalyzers=false\n```\n\n### Use Project-Level Filtering\n\n```bash\n# Build only the project you're working on (and its dependencies)\ndotnet build src\u002FMyApp\u002FMyApp.csproj\n\n# Don't build the entire solution if you only need one project\n```\n\n### Binary Log for All Investigations\n\nAlways start with a binlog:\n```bash\ndotnet build \u002Fbl:perf.binlog -m\n```\n\nThen use the `build-perf-diagnostics` skill and binlog tools for systematic bottleneck identification.\n\n---\n\n## Optimization Decision Tree\n\n```\nIs your no-op build slow (> 10s per project)?\n├── YES → See `incremental-build` skill (fix Inputs\u002FOutputs)\n└── NO\n    Is your cold build slow?\n    ├── YES\n    │   Is restore slow?\n    │   ├── YES → Optimize NuGet restore (use lock files, configure local cache)\n    │   └── NO\n    │       Is compilation slow?\n    │       ├── YES\n    │       │   Are analyzers\u002Fgenerators slow?\n    │       │   ├── YES → See `build-perf-diagnostics` skill\n    │       │   └── NO → Check parallelism, graph build, critical path (this skill + `build-parallelism`)\n    │       └── NO → Check custom targets (binlog analysis via `build-perf-diagnostics`)\n    └── NO\n        Is your warm build slow?\n        ├── YES → Projects rebuilding unnecessarily → check `incremental-build` skill\n        └── NO → Build is healthy! Consider graph build or UseArtifactsOutput for further gains\n```\n",{"name":5,"risk":24,"source":25,"version":30,"category":31,"description":7,"disable-model-invocation":20},"low",{"path":26,"commit":27,"license":15,"repository":28,"imported_at":29},"plugins\u002Fdotnet-msbuild\u002Fskills\u002Fbuild-perf-baseline\u002FSKILL.md","8f3b1a2c","microsoft\u002Fskills","2026-09-20","1.0.0","cloud","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fcloud\u002Fbuild-perf-baseline","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill build-perf-baseline",{"tool":44,"command":45},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill build-perf-baseline",{"tool":47,"command":48},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill build-perf-baseline","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fcloud\u002Fbuild-perf-baseline\u002FSKILL.md",true,[],[53,61,68,75,82,89],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":60},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":60},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":60},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":60},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":60},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":60},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]