eval-performance

Diagnose and optimize MSBuild project evaluation performance using binlog analysis.

Updated Jul 12, 2026
One-click install
npx skills add https://github.com/Patrick-Rex/DotNetTechSamples --skill eval-performance-patrick-rex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: eval-performance
Source: https://github.com/Patrick-Rex/DotNetTechSamples/tree/main/.agents/plugins/dotnet-msbuild/skills/eval-performance
Command: npx skills add https://github.com/Patrick-Rex/DotNetTechSamples --skill eval-performance-patrick-rex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Builds that feel slow before any compilation starts are often caused by expensive MSBuild evaluation: broad glob patterns walking huge directories, deep import chains, repeated project evaluations, or property functions doing file I/O. This Skill helps you measure evaluation time first, then pinpoint and fix the actual bottleneck instead of guessing. ## Core Features & Use Cases - Measurement-first diagnosis: Uses binlog MCP tools, text-log replay, /pp preprocessing, and /clp:PerformanceSummary to confirm evaluation is the real bottleneck before recommending changes. - Targeted optimization guidance: Covers the 5 MSBuild evaluation phases, glob optimization via DefaultItemExcludes, import chain analysis, multiple-evaluation detection, and property function cost rules. - Use Case: A solution takes 30 seconds before compilation begins. You capture a binlog, list evaluations and their durations, discover a custom glob scanning node_modules, and fix it with a DefaultItemExcludes entry. ## Quick Start Analyze my build.binlog to find why MSBuild evaluation is slow and suggest the smallest fix.

Frequently Asked Questions about eval-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose slow MSBuild evaluation performance?

Capture a binlog and use the binlog MCP evaluations tool to list evaluation durations, or replay the log with -flp:v=diag and grep for evaluation started/finished events. Confirm evaluation is the bottleneck before changing any project configuration.

How to speed up slow glob patterns in MSBuild projects?

Use DefaultItemExcludes to exclude large directories like node_modules, .git, bin, and obj from glob expansion. Prefer specific paths like src/**/*.cs over **/*.cs, and only disable EnableDefaultItems as a last resort.

Why is my MSBuild project evaluated multiple times?

A project is evaluated once per unique set of global properties, so references from multiple projects with differing global properties cause repeated evaluations. Normalize global properties or use graph build with /graph to reduce redundant evaluations.

When should I not use evaluation performance optimization?

Do not apply it when slowness occurs during compilation or target execution, or when the issue is incremental rebuild behavior. Also skip changes when measurements show evaluation is already fast, even if broad globs or deep imports exist.

What makes MSBuild property functions expensive during evaluation?

Property functions run during evaluation, so file I/O like $([System.IO.File]::ReadAllText(...)) executes on every evaluation and adds real cost. Property functions should be fast and side-effect-free; avoid network calls and heavy computation.