Dotnet Msbuild
Comprehensive MSBuild and .NET build skills: failure diagnosis, performance optimization, code quality, and modernization.
Skills in this plugin
19- ▌ Msbuild Server · dotnetImprove CLI build performance by enabling MSBuild Server for persistent caching of evaluation results across sequential builds.
- ▌ Item Management · dotnetProvides canonical patterns for MSBuild item groups: Include/Remove/Update semantics, item metadata, batching with %(Metadata), transforms, per-item filtering, and cross-product batching pitfalls.
- ▌ Eval Performance · dotnetDiagnose and improve MSBuild project evaluation performance by analyzing phases, glob patterns, import chains, and property functions.
- ▌ Extension Points · dotnetGuides MSBuild extensibility through CustomBefore/CustomAfter hooks, wildcard imports, import gating, and NuGet package build extension layout.
- ▌ Target Authoring · dotnetCanonical patterns for writing custom MSBuild targets, covering the three-level target chain, chain extension, DependsOnTargets vs BeforeTargets vs AfterTargets, Returns vs Outputs, and common pitfalls.
- ▌ Binlog Generation · dotnetAdd the /bl switch to MSBuild-based commands to generate binary logs for build diagnostics and performance analysis.
- ▌ Build Parallelism · dotnetOptimize MSBuild build parallelism by configuring /maxcpucount, graph build mode, project references, and analyzing binlogs to reduce multi-project solution build times.
- ▌ Incremental Build · dotnetDiagnose and fix slow MSBuild incremental builds by identifying why targets re-execute unnecessarily, covering common causes like missing Inputs/Outputs, volatile properties, and FileWrites registration.
- ▌ Property Patterns · dotnetProvides canonical MSBuild property definition patterns including conditional defaults, composition, path normalization, target framework detection, and evaluation order for diagnosing and fixing property issues in .props and .csproj files.
- ▌ Build Perf Baseline · dotnetMeasure and optimize .NET build performance by establishing baselines, enabling MSBuild Server, using artifacts output, and trimming dependency graphs.
- ▌ Check Bin Obj Clash · dotnetDetects MSBuild projects with conflicting OutputPath or IntermediateOutputPath to diagnose build failures.
- ▌ Msbuild Antipatterns · dotnet bundleDetects and fixes common MSBuild anti-patterns in .csproj, .vbproj, .fsproj, .props, .targets, and .proj files, covering Exec misuse, unquoted conditions, hardcoded paths, and more.
- ▌ Msbuild Modernization · dotnetMigrate legacy MSBuild project files to SDK-style format, reducing .csproj complexity and enabling modern .NET features.
- ▌ Build Perf Diagnostics · dotnetDiagnose MSBuild build performance bottlenecks using binary log analysis, covering timeline analysis, performance summary interpretation, and seven common bottleneck categories.
- ▌ Binlog Failure Analysis · dotnet bundleDiagnose MSBuild build failures by analyzing .binlog files using an MCP server or text-log replay.
- ▌ Copy To Output Directory · dotnetChoosing an MSBuild CopyToOutputDirectory / CopyToPublishDirectory mode: Never, PreserveNewest, Always, and IfDifferent (MSBuild 17.13+), plus $(SkipUnchangedFilesOnCopyAlways). USE FOR: removing the per-build Always copy perf hit; resetting output files mutated between builds. DO NOT USE FOR: general incremental-build diagnosis (use incremental-build); non-MSBuild build systems.
- ▌ Including Generated Files · dotnetFix MSBuild targets so generated files are compiled, copied to output, and cleaned properly.
- ▌ Resolve Project References · dotnetPrevents misguided optimization of MSBuild's ResolveProjectReferences target by explaining that its reported time is wall-clock wait time, not CPU work, and redirects to task self-time analysis.
- ▌ Directory Build Organization · dotnet bundleOrganize multi-project .NET repos with Directory.Build.props, Directory.Build.targets, Directory.Packages.props, and Directory.Build.rsp for centralized MSBuild settings and NuGet Central Package Management.