[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-dotnet-eval-performance":3,"mdc-6owyv9-key":34,"related-org-dotnet-eval-performance":836,"related-repo-dotnet-eval-performance":998},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":26,"topics":27,"repo":29,"sourceUrl":32,"mdContent":33},"eval-performance","diagnose and improve MSBuild evaluation performance","Guide for diagnosing and improving MSBuild project evaluation performance. USE FOR: builds slow before any compilation starts, high evaluation time in binlog analysis, expensive glob patterns walking large directories (node_modules, .git, bin\u002Fobj), deep import chains (>20 levels), preprocessed output >10K lines indicating heavy evaluation, property functions with file I\u002FO ($([System.IO.File]::ReadAllText(...))), multiple evaluations per project. Covers the 5 MSBuild evaluation phases, glob optimization via DefaultItemExcludes, import chain analysis with \u002Fpp preprocessing. DO NOT USE FOR: compilation-time slowness (use build-perf-diagnostics), incremental build issues (use incremental-build), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"dotnet",".NET (Microsoft)","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fdotnet.png",[12,16,19],{"name":13,"slug":14,"type":15},"Performance","performance","tag",{"name":17,"slug":18,"type":15},".NET","net",{"name":20,"slug":21,"type":15},"Debugging","debugging",4576,"https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fskills","2026-07-19T05:38:12.33715","MIT",332,[28],"agent-skills",{"repoUrl":23,"stars":22,"forks":26,"topics":30,"description":31},[28],"Repository for skills to assist AI coding agents with .NET and C#","https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fskills\u002Ftree\u002FHEAD\u002Fplugins\u002Fdotnet-msbuild\u002Fskills\u002Feval-performance","---\nname: eval-performance\ndescription: \"Guide for diagnosing and improving MSBuild project evaluation performance. USE FOR: builds slow before any compilation starts, high evaluation time in binlog analysis, expensive glob patterns walking large directories (node_modules, .git, bin\u002Fobj), deep import chains (>20 levels), preprocessed output >10K lines indicating heavy evaluation, property functions with file I\u002FO ($([System.IO.File]::ReadAllText(...))), multiple evaluations per project. Covers the 5 MSBuild evaluation phases, glob optimization via DefaultItemExcludes, import chain analysis with \u002Fpp preprocessing. DO NOT USE FOR: compilation-time slowness (use build-perf-diagnostics), incremental build issues (use incremental-build), non-MSBuild build systems.\"\nlicense: MIT\n---\n\n# Diagnosing MSBuild Evaluation Performance\n\nEvaluation is the work MSBuild does *before* any target runs — reading project\nfiles, processing imports, expanding globs. This skill helps you **find and\nconfirm** evaluation bottlenecks. Measure first; recommend a change only when a\nmeasurement proves it is warranted.\n\n## Confirm the problem before changing anything\n\nEngage only when evaluation is *measurably* the bottleneck. Do NOT act when:\n\n- **The slowness is during compilation or target execution, not evaluation.**\n  That is not an evaluation problem — use `build-perf-diagnostics` instead.\n- **The complaint is \"rebuilds too much\" \u002F incremental build.** Use\n  `incremental-build` instead.\n- **You have no measurement.** If no binlog or timing summary shows evaluation\n  is slow, gather one first (see below). Do not guess from reading project files.\n- **A pattern below appears but evaluation is already fast.** Broad globs, deep\n  imports, or `EnableDefaultItems` are only worth flagging when the numbers show\n  they cost real time. A project that evaluates quickly needs no change.\n\nWhen a pattern is present but unmeasured, **report it as an observation and let\nthe user decide** — do not rewrite working configuration to match a \"best\npractice\" without evidence it costs measurable evaluation time. Prefer the\nsmallest, most targeted change; never disable SDK defaults as a first move.\n\n## MSBuild Evaluation Phases\n\nFor a comprehensive overview of MSBuild's evaluation and execution model, see [Build process overview](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fvisualstudio\u002Fmsbuild\u002Fbuild-process-overview).\n\n1. **Initial properties**: environment variables, global properties, reserved properties\n2. **Imports and property evaluation**: process `\u003CImport>`, evaluate `\u003CPropertyGroup>` top-to-bottom\n3. **Item definition evaluation**: `\u003CItemDefinitionGroup>` metadata defaults\n4. **Item evaluation**: `\u003CItemGroup>` with `Include`, `Remove`, `Update`, glob expansion\n5. **UsingTask evaluation**: register custom tasks\n\nKey insight: evaluation happens BEFORE any targets run. Slow evaluation = slow build start even when nothing needs compiling.\n\n## Diagnosing Evaluation Performance\n\n### Primary: binlog MCP (preferred)\n\nUse the **binlog MCP server** (`Microsoft.AITools.BinlogMcp`, exposed under the `binlog` MCP namespace) to analyze evaluation performance:\n\n1. Use the evaluations tool to list all evaluations and their durations\n2. Use evaluation_global_properties to check for multiple evaluations with differing global properties\n3. Use evaluation_properties to inspect evaluated properties for a specific project+TFM\n4. Use imports tool to analyze the import chain depth and structure\n5. Use properties tool to check for expensive property function evaluations\n\n### Fallback: text-log replay and preprocessing (when MCP is unavailable)\n\n### Using binlog\n\n1. Replay the binlog: `dotnet msbuild build.binlog -noconlog -fl -flp:v=diag;logfile=full.log`\n2. Search for evaluation events: `grep -i 'Evaluation started\\|Evaluation finished' full.log`\n3. Multiple evaluations for the same project = overbuilding\n4. Look for \"Project evaluation started\u002Ffinished\" messages and their timestamps\n\n### Using \u002Fpp (preprocess)\n\n- `dotnet msbuild -pp:full.xml MyProject.csproj`\n- Shows the fully expanded project with ALL imports inlined\n- Use to understand: what's imported, import depth, total content volume\n- Large preprocessed output (>10K lines) = heavy evaluation\n\n### Using \u002Fclp:PerformanceSummary\n\n- Add to build command for timing breakdown\n- Shows evaluation time separately from target\u002Ftask execution\n\n## Expensive Glob Patterns\n\nOnly pursue these remedies once a measurement shows item evaluation is slow and\nthe globs are the cause; a custom glob that isn't walking large trees is fine.\n\n- Globs like `**\u002F*.cs` walk the entire directory tree\n- Default SDK globs are optimized, but custom globs may not be\n- Problem: globbing over `node_modules\u002F`, `.git\u002F`, `bin\u002F`, `obj\u002F` — millions of files\n- Remedy: use `\u003CDefaultItemExcludes>` to exclude large directories\n- Remedy: be specific with glob paths: `src\u002F**\u002F*.cs` instead of `**\u002F*.cs`\n- Remedy: use `\u003CEnableDefaultItems>false\u003C\u002FEnableDefaultItems>` only as a last resort (loses SDK defaults) — prefer the two options above first\n- Check: grep for Compile items in the diagnostic log → if Compile items include unexpected files, globs are too broad\n\n## Import Chain Analysis\n\n- Deep import chains (>20 levels) slow evaluation\n- Each import: file I\u002FO + parse + evaluate\n- Common causes: NuGet packages adding .props\u002F.targets, framework SDK imports, Directory.Build chains\n- Diagnosis: `\u002Fpp` output → search for `\u003C!-- Importing` comments to see import tree\n- Remedy (only if the chain is measurably costly): reduce transitive package imports where possible, consolidate imports\n\n## Multiple Evaluations\n\n- A project evaluated multiple times = wasted work\n- Common causes: referenced from multiple other projects with different global properties\n- Each unique set of global properties = separate evaluation\n- Diagnosis: `grep 'Evaluation started.*ProjectName' full.log` → if count > 1, check for differing global properties\n- Fix: normalize global properties, use graph build (`\u002Fgraph`)\n\n## TreatAsLocalProperty\n\n- Prevents property values from flowing to child projects via MSBuild task\n- Overuse: declaring many TreatAsLocalProperty entries adds evaluation overhead\n- Correct use: only when you genuinely need to override an inherited property\n\n## Property Function Cost\n\n- Property functions execute during evaluation\n- Most are cheap (string operations)\n- Expensive: `$([System.IO.File]::ReadAllText(...))` during evaluation — reads file on every evaluation\n- Expensive: network calls, heavy computation\n- Rule: property functions should be fast and side-effect-free\n\n## Optimization Checklist\n\n- [ ] Check preprocessed output size: `dotnet msbuild -pp:full.xml`\n- [ ] Verify evaluation count: should be 1 per project per TFM\n- [ ] Exclude large directories from globs\n- [ ] Avoid file I\u002FO in property functions during evaluation\n- [ ] Minimize import depth\n- [ ] Use graph build to reduce redundant evaluations\n- [ ] Check for unnecessary UsingTask declarations\n",{"data":35,"body":36},{"name":4,"description":6,"license":25},{"type":37,"children":38},"root",[39,48,70,77,89,158,170,176,192,300,305,311,318,346,374,380,386,421,427,454,460,473,479,484,587,593,637,643,686,692,710,716,752,758],{"type":40,"tag":41,"props":42,"children":44},"element","h1",{"id":43},"diagnosing-msbuild-evaluation-performance",[45],{"type":46,"value":47},"text","Diagnosing MSBuild Evaluation Performance",{"type":40,"tag":49,"props":50,"children":51},"p",{},[52,54,60,62,68],{"type":46,"value":53},"Evaluation is the work MSBuild does ",{"type":40,"tag":55,"props":56,"children":57},"em",{},[58],{"type":46,"value":59},"before",{"type":46,"value":61}," any target runs — reading project\nfiles, processing imports, expanding globs. This skill helps you ",{"type":40,"tag":63,"props":64,"children":65},"strong",{},[66],{"type":46,"value":67},"find and\nconfirm",{"type":46,"value":69}," evaluation bottlenecks. Measure first; recommend a change only when a\nmeasurement proves it is warranted.",{"type":40,"tag":71,"props":72,"children":74},"h2",{"id":73},"confirm-the-problem-before-changing-anything",[75],{"type":46,"value":76},"Confirm the problem before changing anything",{"type":40,"tag":49,"props":78,"children":79},{},[80,82,87],{"type":46,"value":81},"Engage only when evaluation is ",{"type":40,"tag":55,"props":83,"children":84},{},[85],{"type":46,"value":86},"measurably",{"type":46,"value":88}," the bottleneck. Do NOT act when:",{"type":40,"tag":90,"props":91,"children":92},"ul",{},[93,113,130,140],{"type":40,"tag":94,"props":95,"children":96},"li",{},[97,102,104,111],{"type":40,"tag":63,"props":98,"children":99},{},[100],{"type":46,"value":101},"The slowness is during compilation or target execution, not evaluation.",{"type":46,"value":103},"\nThat is not an evaluation problem — use ",{"type":40,"tag":105,"props":106,"children":108},"code",{"className":107},[],[109],{"type":46,"value":110},"build-perf-diagnostics",{"type":46,"value":112}," instead.",{"type":40,"tag":94,"props":114,"children":115},{},[116,121,123,129],{"type":40,"tag":63,"props":117,"children":118},{},[119],{"type":46,"value":120},"The complaint is \"rebuilds too much\" \u002F incremental build.",{"type":46,"value":122}," Use\n",{"type":40,"tag":105,"props":124,"children":126},{"className":125},[],[127],{"type":46,"value":128},"incremental-build",{"type":46,"value":112},{"type":40,"tag":94,"props":131,"children":132},{},[133,138],{"type":40,"tag":63,"props":134,"children":135},{},[136],{"type":46,"value":137},"You have no measurement.",{"type":46,"value":139}," If no binlog or timing summary shows evaluation\nis slow, gather one first (see below). Do not guess from reading project files.",{"type":40,"tag":94,"props":141,"children":142},{},[143,148,150,156],{"type":40,"tag":63,"props":144,"children":145},{},[146],{"type":46,"value":147},"A pattern below appears but evaluation is already fast.",{"type":46,"value":149}," Broad globs, deep\nimports, or ",{"type":40,"tag":105,"props":151,"children":153},{"className":152},[],[154],{"type":46,"value":155},"EnableDefaultItems",{"type":46,"value":157}," are only worth flagging when the numbers show\nthey cost real time. A project that evaluates quickly needs no change.",{"type":40,"tag":49,"props":159,"children":160},{},[161,163,168],{"type":46,"value":162},"When a pattern is present but unmeasured, ",{"type":40,"tag":63,"props":164,"children":165},{},[166],{"type":46,"value":167},"report it as an observation and let\nthe user decide",{"type":46,"value":169}," — do not rewrite working configuration to match a \"best\npractice\" without evidence it costs measurable evaluation time. Prefer the\nsmallest, most targeted change; never disable SDK defaults as a first move.",{"type":40,"tag":71,"props":171,"children":173},{"id":172},"msbuild-evaluation-phases",[174],{"type":46,"value":175},"MSBuild Evaluation Phases",{"type":40,"tag":49,"props":177,"children":178},{},[179,181,190],{"type":46,"value":180},"For a comprehensive overview of MSBuild's evaluation and execution model, see ",{"type":40,"tag":182,"props":183,"children":187},"a",{"href":184,"rel":185},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fvisualstudio\u002Fmsbuild\u002Fbuild-process-overview",[186],"nofollow",[188],{"type":46,"value":189},"Build process overview",{"type":46,"value":191},".",{"type":40,"tag":193,"props":194,"children":195},"ol",{},[196,206,232,250,290],{"type":40,"tag":94,"props":197,"children":198},{},[199,204],{"type":40,"tag":63,"props":200,"children":201},{},[202],{"type":46,"value":203},"Initial properties",{"type":46,"value":205},": environment variables, global properties, reserved properties",{"type":40,"tag":94,"props":207,"children":208},{},[209,214,216,222,224,230],{"type":40,"tag":63,"props":210,"children":211},{},[212],{"type":46,"value":213},"Imports and property evaluation",{"type":46,"value":215},": process ",{"type":40,"tag":105,"props":217,"children":219},{"className":218},[],[220],{"type":46,"value":221},"\u003CImport>",{"type":46,"value":223},", evaluate ",{"type":40,"tag":105,"props":225,"children":227},{"className":226},[],[228],{"type":46,"value":229},"\u003CPropertyGroup>",{"type":46,"value":231}," top-to-bottom",{"type":40,"tag":94,"props":233,"children":234},{},[235,240,242,248],{"type":40,"tag":63,"props":236,"children":237},{},[238],{"type":46,"value":239},"Item definition evaluation",{"type":46,"value":241},": ",{"type":40,"tag":105,"props":243,"children":245},{"className":244},[],[246],{"type":46,"value":247},"\u003CItemDefinitionGroup>",{"type":46,"value":249}," metadata defaults",{"type":40,"tag":94,"props":251,"children":252},{},[253,258,259,265,267,273,275,281,282,288],{"type":40,"tag":63,"props":254,"children":255},{},[256],{"type":46,"value":257},"Item evaluation",{"type":46,"value":241},{"type":40,"tag":105,"props":260,"children":262},{"className":261},[],[263],{"type":46,"value":264},"\u003CItemGroup>",{"type":46,"value":266}," with ",{"type":40,"tag":105,"props":268,"children":270},{"className":269},[],[271],{"type":46,"value":272},"Include",{"type":46,"value":274},", ",{"type":40,"tag":105,"props":276,"children":278},{"className":277},[],[279],{"type":46,"value":280},"Remove",{"type":46,"value":274},{"type":40,"tag":105,"props":283,"children":285},{"className":284},[],[286],{"type":46,"value":287},"Update",{"type":46,"value":289},", glob expansion",{"type":40,"tag":94,"props":291,"children":292},{},[293,298],{"type":40,"tag":63,"props":294,"children":295},{},[296],{"type":46,"value":297},"UsingTask evaluation",{"type":46,"value":299},": register custom tasks",{"type":40,"tag":49,"props":301,"children":302},{},[303],{"type":46,"value":304},"Key insight: evaluation happens BEFORE any targets run. Slow evaluation = slow build start even when nothing needs compiling.",{"type":40,"tag":71,"props":306,"children":308},{"id":307},"diagnosing-evaluation-performance",[309],{"type":46,"value":310},"Diagnosing Evaluation Performance",{"type":40,"tag":312,"props":313,"children":315},"h3",{"id":314},"primary-binlog-mcp-preferred",[316],{"type":46,"value":317},"Primary: binlog MCP (preferred)",{"type":40,"tag":49,"props":319,"children":320},{},[321,323,328,330,336,338,344],{"type":46,"value":322},"Use the ",{"type":40,"tag":63,"props":324,"children":325},{},[326],{"type":46,"value":327},"binlog MCP server",{"type":46,"value":329}," (",{"type":40,"tag":105,"props":331,"children":333},{"className":332},[],[334],{"type":46,"value":335},"Microsoft.AITools.BinlogMcp",{"type":46,"value":337},", exposed under the ",{"type":40,"tag":105,"props":339,"children":341},{"className":340},[],[342],{"type":46,"value":343},"binlog",{"type":46,"value":345}," MCP namespace) to analyze evaluation performance:",{"type":40,"tag":193,"props":347,"children":348},{},[349,354,359,364,369],{"type":40,"tag":94,"props":350,"children":351},{},[352],{"type":46,"value":353},"Use the evaluations tool to list all evaluations and their durations",{"type":40,"tag":94,"props":355,"children":356},{},[357],{"type":46,"value":358},"Use evaluation_global_properties to check for multiple evaluations with differing global properties",{"type":40,"tag":94,"props":360,"children":361},{},[362],{"type":46,"value":363},"Use evaluation_properties to inspect evaluated properties for a specific project+TFM",{"type":40,"tag":94,"props":365,"children":366},{},[367],{"type":46,"value":368},"Use imports tool to analyze the import chain depth and structure",{"type":40,"tag":94,"props":370,"children":371},{},[372],{"type":46,"value":373},"Use properties tool to check for expensive property function evaluations",{"type":40,"tag":312,"props":375,"children":377},{"id":376},"fallback-text-log-replay-and-preprocessing-when-mcp-is-unavailable",[378],{"type":46,"value":379},"Fallback: text-log replay and preprocessing (when MCP is unavailable)",{"type":40,"tag":312,"props":381,"children":383},{"id":382},"using-binlog",[384],{"type":46,"value":385},"Using binlog",{"type":40,"tag":193,"props":387,"children":388},{},[389,400,411,416],{"type":40,"tag":94,"props":390,"children":391},{},[392,394],{"type":46,"value":393},"Replay the binlog: ",{"type":40,"tag":105,"props":395,"children":397},{"className":396},[],[398],{"type":46,"value":399},"dotnet msbuild build.binlog -noconlog -fl -flp:v=diag;logfile=full.log",{"type":40,"tag":94,"props":401,"children":402},{},[403,405],{"type":46,"value":404},"Search for evaluation events: ",{"type":40,"tag":105,"props":406,"children":408},{"className":407},[],[409],{"type":46,"value":410},"grep -i 'Evaluation started\\|Evaluation finished' full.log",{"type":40,"tag":94,"props":412,"children":413},{},[414],{"type":46,"value":415},"Multiple evaluations for the same project = overbuilding",{"type":40,"tag":94,"props":417,"children":418},{},[419],{"type":46,"value":420},"Look for \"Project evaluation started\u002Ffinished\" messages and their timestamps",{"type":40,"tag":312,"props":422,"children":424},{"id":423},"using-pp-preprocess",[425],{"type":46,"value":426},"Using \u002Fpp (preprocess)",{"type":40,"tag":90,"props":428,"children":429},{},[430,439,444,449],{"type":40,"tag":94,"props":431,"children":432},{},[433],{"type":40,"tag":105,"props":434,"children":436},{"className":435},[],[437],{"type":46,"value":438},"dotnet msbuild -pp:full.xml MyProject.csproj",{"type":40,"tag":94,"props":440,"children":441},{},[442],{"type":46,"value":443},"Shows the fully expanded project with ALL imports inlined",{"type":40,"tag":94,"props":445,"children":446},{},[447],{"type":46,"value":448},"Use to understand: what's imported, import depth, total content volume",{"type":40,"tag":94,"props":450,"children":451},{},[452],{"type":46,"value":453},"Large preprocessed output (>10K lines) = heavy evaluation",{"type":40,"tag":312,"props":455,"children":457},{"id":456},"using-clpperformancesummary",[458],{"type":46,"value":459},"Using \u002Fclp:PerformanceSummary",{"type":40,"tag":90,"props":461,"children":462},{},[463,468],{"type":40,"tag":94,"props":464,"children":465},{},[466],{"type":46,"value":467},"Add to build command for timing breakdown",{"type":40,"tag":94,"props":469,"children":470},{},[471],{"type":46,"value":472},"Shows evaluation time separately from target\u002Ftask execution",{"type":40,"tag":71,"props":474,"children":476},{"id":475},"expensive-glob-patterns",[477],{"type":46,"value":478},"Expensive Glob Patterns",{"type":40,"tag":49,"props":480,"children":481},{},[482],{"type":46,"value":483},"Only pursue these remedies once a measurement shows item evaluation is slow and\nthe globs are the cause; a custom glob that isn't walking large trees is fine.",{"type":40,"tag":90,"props":485,"children":486},{},[487,500,505,539,552,570,582],{"type":40,"tag":94,"props":488,"children":489},{},[490,492,498],{"type":46,"value":491},"Globs like ",{"type":40,"tag":105,"props":493,"children":495},{"className":494},[],[496],{"type":46,"value":497},"**\u002F*.cs",{"type":46,"value":499}," walk the entire directory tree",{"type":40,"tag":94,"props":501,"children":502},{},[503],{"type":46,"value":504},"Default SDK globs are optimized, but custom globs may not be",{"type":40,"tag":94,"props":506,"children":507},{},[508,510,516,517,523,524,530,531,537],{"type":46,"value":509},"Problem: globbing over ",{"type":40,"tag":105,"props":511,"children":513},{"className":512},[],[514],{"type":46,"value":515},"node_modules\u002F",{"type":46,"value":274},{"type":40,"tag":105,"props":518,"children":520},{"className":519},[],[521],{"type":46,"value":522},".git\u002F",{"type":46,"value":274},{"type":40,"tag":105,"props":525,"children":527},{"className":526},[],[528],{"type":46,"value":529},"bin\u002F",{"type":46,"value":274},{"type":40,"tag":105,"props":532,"children":534},{"className":533},[],[535],{"type":46,"value":536},"obj\u002F",{"type":46,"value":538}," — millions of files",{"type":40,"tag":94,"props":540,"children":541},{},[542,544,550],{"type":46,"value":543},"Remedy: use ",{"type":40,"tag":105,"props":545,"children":547},{"className":546},[],[548],{"type":46,"value":549},"\u003CDefaultItemExcludes>",{"type":46,"value":551}," to exclude large directories",{"type":40,"tag":94,"props":553,"children":554},{},[555,557,563,565],{"type":46,"value":556},"Remedy: be specific with glob paths: ",{"type":40,"tag":105,"props":558,"children":560},{"className":559},[],[561],{"type":46,"value":562},"src\u002F**\u002F*.cs",{"type":46,"value":564}," instead of ",{"type":40,"tag":105,"props":566,"children":568},{"className":567},[],[569],{"type":46,"value":497},{"type":40,"tag":94,"props":571,"children":572},{},[573,574,580],{"type":46,"value":543},{"type":40,"tag":105,"props":575,"children":577},{"className":576},[],[578],{"type":46,"value":579},"\u003CEnableDefaultItems>false\u003C\u002FEnableDefaultItems>",{"type":46,"value":581}," only as a last resort (loses SDK defaults) — prefer the two options above first",{"type":40,"tag":94,"props":583,"children":584},{},[585],{"type":46,"value":586},"Check: grep for Compile items in the diagnostic log → if Compile items include unexpected files, globs are too broad",{"type":40,"tag":71,"props":588,"children":590},{"id":589},"import-chain-analysis",[591],{"type":46,"value":592},"Import Chain Analysis",{"type":40,"tag":90,"props":594,"children":595},{},[596,601,606,611,632],{"type":40,"tag":94,"props":597,"children":598},{},[599],{"type":46,"value":600},"Deep import chains (>20 levels) slow evaluation",{"type":40,"tag":94,"props":602,"children":603},{},[604],{"type":46,"value":605},"Each import: file I\u002FO + parse + evaluate",{"type":40,"tag":94,"props":607,"children":608},{},[609],{"type":46,"value":610},"Common causes: NuGet packages adding .props\u002F.targets, framework SDK imports, Directory.Build chains",{"type":40,"tag":94,"props":612,"children":613},{},[614,616,622,624,630],{"type":46,"value":615},"Diagnosis: ",{"type":40,"tag":105,"props":617,"children":619},{"className":618},[],[620],{"type":46,"value":621},"\u002Fpp",{"type":46,"value":623}," output → search for ",{"type":40,"tag":105,"props":625,"children":627},{"className":626},[],[628],{"type":46,"value":629},"\u003C!-- Importing",{"type":46,"value":631}," comments to see import tree",{"type":40,"tag":94,"props":633,"children":634},{},[635],{"type":46,"value":636},"Remedy (only if the chain is measurably costly): reduce transitive package imports where possible, consolidate imports",{"type":40,"tag":71,"props":638,"children":640},{"id":639},"multiple-evaluations",[641],{"type":46,"value":642},"Multiple Evaluations",{"type":40,"tag":90,"props":644,"children":645},{},[646,651,656,661,673],{"type":40,"tag":94,"props":647,"children":648},{},[649],{"type":46,"value":650},"A project evaluated multiple times = wasted work",{"type":40,"tag":94,"props":652,"children":653},{},[654],{"type":46,"value":655},"Common causes: referenced from multiple other projects with different global properties",{"type":40,"tag":94,"props":657,"children":658},{},[659],{"type":46,"value":660},"Each unique set of global properties = separate evaluation",{"type":40,"tag":94,"props":662,"children":663},{},[664,665,671],{"type":46,"value":615},{"type":40,"tag":105,"props":666,"children":668},{"className":667},[],[669],{"type":46,"value":670},"grep 'Evaluation started.*ProjectName' full.log",{"type":46,"value":672}," → if count > 1, check for differing global properties",{"type":40,"tag":94,"props":674,"children":675},{},[676,678,684],{"type":46,"value":677},"Fix: normalize global properties, use graph build (",{"type":40,"tag":105,"props":679,"children":681},{"className":680},[],[682],{"type":46,"value":683},"\u002Fgraph",{"type":46,"value":685},")",{"type":40,"tag":71,"props":687,"children":689},{"id":688},"treataslocalproperty",[690],{"type":46,"value":691},"TreatAsLocalProperty",{"type":40,"tag":90,"props":693,"children":694},{},[695,700,705],{"type":40,"tag":94,"props":696,"children":697},{},[698],{"type":46,"value":699},"Prevents property values from flowing to child projects via MSBuild task",{"type":40,"tag":94,"props":701,"children":702},{},[703],{"type":46,"value":704},"Overuse: declaring many TreatAsLocalProperty entries adds evaluation overhead",{"type":40,"tag":94,"props":706,"children":707},{},[708],{"type":46,"value":709},"Correct use: only when you genuinely need to override an inherited property",{"type":40,"tag":71,"props":711,"children":713},{"id":712},"property-function-cost",[714],{"type":46,"value":715},"Property Function Cost",{"type":40,"tag":90,"props":717,"children":718},{},[719,724,729,742,747],{"type":40,"tag":94,"props":720,"children":721},{},[722],{"type":46,"value":723},"Property functions execute during evaluation",{"type":40,"tag":94,"props":725,"children":726},{},[727],{"type":46,"value":728},"Most are cheap (string operations)",{"type":40,"tag":94,"props":730,"children":731},{},[732,734,740],{"type":46,"value":733},"Expensive: ",{"type":40,"tag":105,"props":735,"children":737},{"className":736},[],[738],{"type":46,"value":739},"$([System.IO.File]::ReadAllText(...))",{"type":46,"value":741}," during evaluation — reads file on every evaluation",{"type":40,"tag":94,"props":743,"children":744},{},[745],{"type":46,"value":746},"Expensive: network calls, heavy computation",{"type":40,"tag":94,"props":748,"children":749},{},[750],{"type":46,"value":751},"Rule: property functions should be fast and side-effect-free",{"type":40,"tag":71,"props":753,"children":755},{"id":754},"optimization-checklist",[756],{"type":46,"value":757},"Optimization Checklist",{"type":40,"tag":90,"props":759,"children":762},{"className":760},[761],"contains-task-list",[763,782,791,800,809,818,827],{"type":40,"tag":94,"props":764,"children":767},{"className":765},[766],"task-list-item",[768,774,776],{"type":40,"tag":769,"props":770,"children":773},"input",{"disabled":771,"type":772},true,"checkbox",[],{"type":46,"value":775}," Check preprocessed output size: ",{"type":40,"tag":105,"props":777,"children":779},{"className":778},[],[780],{"type":46,"value":781},"dotnet msbuild -pp:full.xml",{"type":40,"tag":94,"props":783,"children":785},{"className":784},[766],[786,789],{"type":40,"tag":769,"props":787,"children":788},{"disabled":771,"type":772},[],{"type":46,"value":790}," Verify evaluation count: should be 1 per project per TFM",{"type":40,"tag":94,"props":792,"children":794},{"className":793},[766],[795,798],{"type":40,"tag":769,"props":796,"children":797},{"disabled":771,"type":772},[],{"type":46,"value":799}," Exclude large directories from globs",{"type":40,"tag":94,"props":801,"children":803},{"className":802},[766],[804,807],{"type":40,"tag":769,"props":805,"children":806},{"disabled":771,"type":772},[],{"type":46,"value":808}," Avoid file I\u002FO in property functions during evaluation",{"type":40,"tag":94,"props":810,"children":812},{"className":811},[766],[813,816],{"type":40,"tag":769,"props":814,"children":815},{"disabled":771,"type":772},[],{"type":46,"value":817}," Minimize import depth",{"type":40,"tag":94,"props":819,"children":821},{"className":820},[766],[822,825],{"type":40,"tag":769,"props":823,"children":824},{"disabled":771,"type":772},[],{"type":46,"value":826}," Use graph build to reduce redundant evaluations",{"type":40,"tag":94,"props":828,"children":830},{"className":829},[766],[831,834],{"type":40,"tag":769,"props":832,"children":833},{"disabled":771,"type":772},[],{"type":46,"value":835}," Check for unnecessary UsingTask declarations",{"items":837,"total":997},[838,852,865,880,898,912,932,942,954,964,977,987],{"slug":839,"name":839,"fn":840,"description":841,"org":842,"tags":843,"stars":849,"repoUrl":850,"updatedAt":851},"multithreaded-task-migration","migrate MSBuild tasks to multithreaded mode","Guide for migrating MSBuild tasks to multithreaded mode support, including compatibility red-team review. Use this when converting tasks to thread-safe versions, implementing IMultiThreadableTask, adding TaskEnvironment support, or auditing migrations for behavioral compatibility.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[844,845,848],{"name":17,"slug":18,"type":15},{"name":846,"slug":847,"type":15},"Engineering","engineering",{"name":13,"slug":14,"type":15},5535,"https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fmsbuild","2026-07-22T05:37:33.965588",{"slug":853,"name":853,"fn":854,"description":855,"org":856,"tags":857,"stars":22,"repoUrl":23,"updatedAt":864},"analyzing-dotnet-performance","analyze .NET code for performance anti-patterns","Scans .NET code for ~50 performance anti-patterns across async, memory, strings, collections, LINQ, regex, serialization, and I\u002FO with tiered severity classification. Use when analyzing .NET code for optimization opportunities, reviewing hot paths, or auditing allocation-heavy patterns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[858,859,862,863],{"name":17,"slug":18,"type":15},{"name":860,"slug":861,"type":15},"Code Analysis","code-analysis",{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-12T08:23:25.400375",{"slug":866,"name":866,"fn":867,"description":868,"org":869,"tags":870,"stars":22,"repoUrl":23,"updatedAt":879},"android-tombstone-symbolication","symbolicate .NET runtime frames in Android tombstones","Symbolicate the .NET runtime frames in an Android tombstone file. Extracts BuildIds and PC offsets from the native backtrace, downloads debug symbols from the Microsoft symbol server, and runs llvm-symbolizer to produce function names with source file and line numbers. USE FOR triaging a .NET MAUI or Mono Android app crash from a tombstone, resolving native backtrace frames in libmonosgen-2.0.so or libcoreclr.so to .NET runtime source code, or investigating SIGABRT, SIGSEGV, or other native signals originating from the .NET runtime on Android. DO NOT USE FOR pure Java\u002FKotlin crashes, managed .NET exceptions that are already captured in logcat, or iOS crash logs. INVOKES Symbolicate-Tombstone.ps1 script, llvm-symbolizer, Microsoft symbol server.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[871,872,875,876],{"name":17,"slug":18,"type":15},{"name":873,"slug":874,"type":15},"Android","android",{"name":20,"slug":21,"type":15},{"name":877,"slug":878,"type":15},"Microsoft","microsoft","2026-07-12T08:23:21.595572",{"slug":881,"name":881,"fn":882,"description":883,"org":884,"tags":885,"stars":22,"repoUrl":23,"updatedAt":897},"apple-crash-symbolication","symbolicate .NET runtime frames in crash logs","Symbolicate .NET runtime frames in Apple platform .ips crash logs (iOS, tvOS, Mac Catalyst, macOS). Extracts UUIDs and addresses from the native backtrace, locates dSYM debug symbols, and runs atos to produce function names with source file and line numbers. Automatically downloads .dwarf symbols from the Microsoft symbol server using Mach-O UUIDs. USE FOR triaging a .NET MAUI or Mono app crash from an .ips file on any Apple platform, resolving native backtrace frames in libcoreclr or libmonosgen-2.0 to .NET runtime source code, retrieving .ips crash logs from a connected iOS device or iPhone, or investigating EXC_CRASH, EXC_BAD_ACCESS, SIGABRT, or SIGSEGV originating from the .NET runtime. DO NOT USE FOR pure Swift\u002FObjective-C crashes with no .NET components, or Android tombstone files. INVOKES Symbolicate-Crash.ps1 script, atos, dwarfdump, idevicecrashreport.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[886,887,888,891,894],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":889,"slug":890,"type":15},"iOS","ios",{"name":892,"slug":893,"type":15},"macOS","macos",{"name":895,"slug":896,"type":15},"Observability","observability","2026-07-12T08:23:20.369986",{"slug":899,"name":899,"fn":900,"description":901,"org":902,"tags":903,"stars":22,"repoUrl":23,"updatedAt":911},"assertion-quality","evaluate assertion quality in test suites","Analyzes the variety and depth of assertions across test suites in any language. Use when the user asks to evaluate assertion quality, find shallow tests, identify assertion-free tests (no assertions or only trivial ones like Assert.IsNotNull \u002F toBeTruthy()), flag self-referential or tautological assertions, measure assertion diversity, or audit whether tests verify different facets of behavior. Polyglot: .NET, Python, TS\u002FJS, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, C++. DO NOT USE FOR: writing new tests (use code-testing-agent \u002F writing-mstest-tests), mutation reasoning about whether tests would catch a bug (use test-gap-analysis), or a general severity-ranked anti-pattern audit (use test-anti-patterns), fixing or rewriting assertions, or writing, fixing, or modernizing MSTest tests, assertions, or attributes (use writing-mstest-tests).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[904,905,908],{"name":860,"slug":861,"type":15},{"name":906,"slug":907,"type":15},"QA","qa",{"name":909,"slug":910,"type":15},"Testing","testing","2026-07-12T08:23:51.277743",{"slug":913,"name":913,"fn":914,"description":915,"org":916,"tags":917,"stars":22,"repoUrl":23,"updatedAt":931},"author-component","create and review Blazor components","Create or review Blazor components (.razor files) with correct architecture. USE FOR: writing new Blazor components that do NOT involve JavaScript interop, implementing parameters and EventCallback, RenderFragment slots, component lifecycle (OnInitializedAsync, OnParametersSet), async patterns, IAsyncDisposable, CancellationToken, CSS isolation, code-behind. DO NOT USE FOR: creating new projects (use create-blazor-project), JavaScript interop or calling browser APIs from Blazor (use use-js-interop), forms and validation (use collect-user-input), prerendering issues (use support-prerendering), HTTP data fetching patterns (use fetch-and-send-data), coordinating state between unrelated components (use coordinate-components).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[918,919,922,925,928],{"name":17,"slug":18,"type":15},{"name":920,"slug":921,"type":15},"Blazor","blazor",{"name":923,"slug":924,"type":15},"C#","csharp",{"name":926,"slug":927,"type":15},"UI Components","ui-components",{"name":929,"slug":930,"type":15},"Web Development","web-development","2026-07-15T06:03:29.216359",{"slug":933,"name":933,"fn":934,"description":935,"org":936,"tags":937,"stars":22,"repoUrl":23,"updatedAt":941},"binlog-failure-analysis","analyze MSBuild binary logs","Analyze MSBuild binary logs to diagnose build failures. USE FOR: build errors that are unclear from console output, diagnosing cascading failures across multi-project builds, tracing MSBuild target execution order, and generally any MSBuild build issues. Requires an existing .binlog file. DO NOT USE FOR: generating binlogs (use binlog-generation), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[938,939,940],{"name":860,"slug":861,"type":15},{"name":20,"slug":21,"type":15},{"name":877,"slug":878,"type":15},"2026-07-12T08:21:34.637923",{"slug":943,"name":943,"fn":944,"description":945,"org":946,"tags":947,"stars":22,"repoUrl":23,"updatedAt":953},"binlog-generation","generate MSBuild binary logs for diagnostics","Generate MSBuild binary logs (binlogs) for build diagnostics and analysis. USE FOR: adding \u002Fbl:{} to any dotnet build, test, pack, publish, or restore command to capture a full build execution trace, prerequisite for binlog-failure-analysis and build-perf-diagnostics skills, enabling post-build investigation of errors or performance. Requires MSBuild 17.8+ \u002F .NET 8 SDK+ for {} placeholder; PowerShell needs -bl:{{}}. DO NOT USE FOR: non-MSBuild build systems (npm, Maven, CMake), analyzing an existing binlog (use binlog-failure-analysis instead).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[948,951,952],{"name":949,"slug":950,"type":15},"Build","build",{"name":20,"slug":21,"type":15},{"name":846,"slug":847,"type":15},"2026-07-19T05:38:19.340791",{"slug":955,"name":955,"fn":956,"description":957,"org":958,"tags":959,"stars":22,"repoUrl":23,"updatedAt":963},"build-parallelism","optimize MSBuild build parallelism","Diagnose and fix under-parallelized MSBuild builds. USE WHEN a multi-project solution build is slower than expected, doesn't speed up when you add cores, pegs a single core while others idle, or you want to know why `-m` isn't helping. Note: `\u002Fmaxcpucount` default is 1 (sequential) — always pass `-m` for parallel builds. Covers finding the critical path (longest serial ProjectReference chain), graph build (`\u002Fgraph`), BuildInParallel, and solution filters (`.slnf`). DO NOT USE FOR: single-project builds, incremental issues (use incremental-build), compilation slowness inside one project (use build-perf-diagnostics), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[960,961,962],{"name":17,"slug":18,"type":15},{"name":846,"slug":847,"type":15},{"name":13,"slug":14,"type":15},"2026-07-19T05:38:18.364937",{"slug":965,"name":965,"fn":966,"description":967,"org":968,"tags":969,"stars":22,"repoUrl":23,"updatedAt":976},"build-perf-baseline","establish and optimize build performance baselines","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 MSBuild Server, static graph builds, artifacts output, and dependency graph trimming. Start here before diving into build-perf-diagnostics, incremental-build, or build-parallelism. DO NOT USE FOR: non-MSBuild build systems, detailed bottleneck analysis (use build-perf-diagnostics after baselining).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[970,971,974,975],{"name":846,"slug":847,"type":15},{"name":972,"slug":973,"type":15},"Monitoring","monitoring",{"name":13,"slug":14,"type":15},{"name":909,"slug":910,"type":15},"2026-07-12T08:21:35.865649",{"slug":110,"name":110,"fn":978,"description":979,"org":980,"tags":981,"stars":22,"repoUrl":23,"updatedAt":986},"diagnose MSBuild build performance bottlenecks","Diagnose MSBuild build performance bottlenecks using binary log analysis. USE FOR: identifying why builds are slow by analyzing binlog performance summaries, detecting ResolveAssemblyReference (RAR) taking >5s, Roslyn analyzers consuming >30% of Csc time, single targets dominating >50% of build time, node utilization below 80%, excessive Copy tasks, NuGet restore running every build. Covers timeline analysis, Target\u002FTask Performance Summary interpretation, and 7 common bottleneck categories. Use after build-perf-baseline has established measurements. DO NOT USE FOR: establishing initial baselines (use build-perf-baseline first), fixing incremental build issues (use incremental-build), parallelism tuning (use build-parallelism), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[982,983,984,985],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":846,"slug":847,"type":15},{"name":13,"slug":14,"type":15},"2026-07-12T08:21:40.961722",{"slug":988,"name":988,"fn":989,"description":990,"org":991,"tags":992,"stars":22,"repoUrl":23,"updatedAt":996},"check-bin-obj-clash","detect MSBuild output path conflicts","Detects MSBuild projects with conflicting OutputPath or IntermediateOutputPath. USE FOR: builds failing with 'Cannot create a file when that file already exists', 'The process cannot access the file because it is being used by another process', intermittent build failures that succeed on retry, or missing\u002Foverwritten outputs in multi-project or multi-targeting builds where bin\u002Fobj (or project.assets.json) collide. Common causes: shared OutputPath, missing AppendTargetFrameworkToOutputPath, extra global properties (e.g. PublishReadyToRun), or SetTargetFramework on a ProjectReference to a single-targeting project. DO NOT USE FOR: file access errors unrelated to MSBuild (OS-level locking), single-project single-TFM builds, non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[993,994,995],{"name":20,"slug":21,"type":15},{"name":846,"slug":847,"type":15},{"name":906,"slug":907,"type":15},"2026-07-19T05:38:14.336279",144,{"items":999,"total":1048},[1000,1007,1014,1022,1028,1036,1042],{"slug":853,"name":853,"fn":854,"description":855,"org":1001,"tags":1002,"stars":22,"repoUrl":23,"updatedAt":864},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1003,1004,1005,1006],{"name":17,"slug":18,"type":15},{"name":860,"slug":861,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":866,"name":866,"fn":867,"description":868,"org":1008,"tags":1009,"stars":22,"repoUrl":23,"updatedAt":879},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1010,1011,1012,1013],{"name":17,"slug":18,"type":15},{"name":873,"slug":874,"type":15},{"name":20,"slug":21,"type":15},{"name":877,"slug":878,"type":15},{"slug":881,"name":881,"fn":882,"description":883,"org":1015,"tags":1016,"stars":22,"repoUrl":23,"updatedAt":897},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1017,1018,1019,1020,1021],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":889,"slug":890,"type":15},{"name":892,"slug":893,"type":15},{"name":895,"slug":896,"type":15},{"slug":899,"name":899,"fn":900,"description":901,"org":1023,"tags":1024,"stars":22,"repoUrl":23,"updatedAt":911},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1025,1026,1027],{"name":860,"slug":861,"type":15},{"name":906,"slug":907,"type":15},{"name":909,"slug":910,"type":15},{"slug":913,"name":913,"fn":914,"description":915,"org":1029,"tags":1030,"stars":22,"repoUrl":23,"updatedAt":931},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1031,1032,1033,1034,1035],{"name":17,"slug":18,"type":15},{"name":920,"slug":921,"type":15},{"name":923,"slug":924,"type":15},{"name":926,"slug":927,"type":15},{"name":929,"slug":930,"type":15},{"slug":933,"name":933,"fn":934,"description":935,"org":1037,"tags":1038,"stars":22,"repoUrl":23,"updatedAt":941},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1039,1040,1041],{"name":860,"slug":861,"type":15},{"name":20,"slug":21,"type":15},{"name":877,"slug":878,"type":15},{"slug":943,"name":943,"fn":944,"description":945,"org":1043,"tags":1044,"stars":22,"repoUrl":23,"updatedAt":953},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1045,1046,1047],{"name":949,"slug":950,"type":15},{"name":20,"slug":21,"type":15},{"name":846,"slug":847,"type":15},96]