microsoft/eval-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/obj), deep import chains (>20 levels), preprocessed output >10K lines indicating heavy evaluation, property functions with file I/O ($([System.IO.File]::ReadAllText(...))), multiple evaluations per project. Covers the 5 MSBuild evaluation phases, glob optimization via DefaultItemExcludes, import chain analysis with /pp preprocessing. DO NOT USE FOR: compilation-time slowness (use build-perf-diagnostics), incremental build issues (use incremental-build), non-MSBuild build systems.
npx skills add https://github.com/microsoft/testfx --skill eval-performance
For a comprehensive overview of MSBuild's evaluation and execution model, see Build process overview.
<Import>, evaluate <PropertyGroup> top-to-bottom<ItemDefinitionGroup> metadata defaults<ItemGroup> with Include, Remove, Update, glob expansionKey insight: evaluation happens BEFORE any targets run. Slow evaluation = slow build start even when nothing needs compiling.
Use the binlog MCP server (Microsoft.AITools.BinlogMcp, exposed under the binlog MCP namespace) to analyze evaluation performance:
dotnet msbuild build.binlog -noconlog -fl -flp:v=diag;logfile=full.loggrep -i 'Evaluation started\|Evaluation finished' full.logdotnet msbuild -pp:full.xml MyProject.csproj**/*.cs walk the entire directory treenode_modules/, .git/, bin/, obj/ — millions of files<DefaultItemExcludes> to exclude large directoriessrc//*.cs instead of /*.cs<EnableDefaultItems>false</EnableDefaultItems> only as last resort (lose SDK defaults)/pp output → search for <!-- Importing comments to see import treegrep 'Evaluation started.*ProjectName' full.log → if count > 1, check for differing global properties/graph)$([System.IO.File]::ReadAllText(...)) during evaluation — reads file on every evaluationdotnet msbuild -pp:full.xmlTake microsoft/eval-performance from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.