Skip to content

Code quality & tooling

Build, package and analyzer setup that scales across many repositories.

Quality
13 posts1 h 31 min reading time
Start with part 1 →
  1. Central Package Management — one version per package, one place to change itForty projects, three versions of the same logging package and a downgrade warning nobody can explain. How Central Package Management with Directory.Packages.props fixes version drift, how to migrate, and which tools quietly break when you do.8 min read
  2. Directory.Build.props — stop copying the same ten lines into every projectThirty project files, each with its own idea of the target framework, nullable setting and warning level. How Directory.Build.props gives a solution one baseline, what belongs in it, what belongs in Directory.Build.targets, and the traps that make settings silently not apply.7 min read
  3. Versioning with GitVersion — let the history decide the numberA NuGet package whose version is 1.0.0 forever, or one that jumps whenever somebody remembers to edit the csproj, tells consumers nothing. How GitVersion derives semantic versions from your git history, how to configure it, and how to keep developers from forgetting the one thing it depends on.7 min read
  4. Source Link — step into your own NuGet packages like they were project referencesYou press F11 on a call into your team's shared package and land in decompiled code, or nowhere at all. How Source Link maps packaged binaries back to the exact commit, what changed with .NET 8, how to choose between embedded PDBs and symbol packages, and how to verify a package before anyone needs it at 2 a.m.6 min read
  5. Publishing ReadyToRun — faster startup without touching a line of codeCold starts in serverless functions, slow first requests after every deployment, containers that take ages to become healthy. ReadyToRun precompiles your code at publish time. What it actually does, when it helps, how it compares to Native AOT, and how to measure whether it's worth it for you.6 min read
  6. Slow Debug builds — it usually isn't Visual StudioAn incremental Debug build of six projects that takes 44 seconds isn't a hardware problem. How publish-time settings leak into the inner loop, why antivirus and Dev Drive matter, what Build Acceleration does, and how to get fast Debug builds without weakening a single quality gate.7 min read
  7. Creating NuGet packages your teams actually want to consumeA package with no description, no readme, version 1.0.0 and a dependency on your analyzers is just a zip file with extra steps. What a good internal NuGet package needs, how to set up feeds and pipelines so nobody pushes by hand, and how to make the build refuse a half-finished package.7 min read
  8. NuGet audit — vulnerable packages you never referenced, and why publish finds what build doesn'tdotnet build is green, dotnet publish fails with NU1903 for a package nobody in the team has ever heard of. How NuGet audit works, why the restore graph of publish differs from build, how to find out who pulls in a transitive dependency, and how to fix or suppress findings without switching the whole check off.7 min read
  9. Building .NET tools — from a script in the wiki to dotnet tool installEvery team has a folder of PowerShell scripts and a wiki page explaining which one to run when. .NET tools turn that into versioned, installable, testable CLIs distributed through NuGet. How to build one with System.CommandLine, global vs. local tools, and the details that make a tool pleasant instead of painful.6 min read
  10. Roslynator and off-the-shelf analyzers — from IDE squiggles to a CI gateAnalyzers that only live in someone's Visual Studio extension don't protect anything. How to pick and configure .NET analyzers and Roslynator via NuGet and .editorconfig, roll them out in a legacy codebase without a thousand-warning wall, and make the same rules fail the build in CI.7 min read
  11. Consistent formatting locally and in CI — when IDE0055 fails only on the build agentThe build is clean on every Windows laptop and fails on the Linux agent with hundreds of IDE0055 "fix formatting" errors. Line endings, byte order marks and IDE formatters that don't agree with Roslyn. How .editorconfig, .gitattributes and dotnet format give you one formatting truth across machines.7 min read
  12. A code review checklist — goals, non-goals and what humans should actually look atMost review checklists are a list of twenty generic questions nobody reads. Mine starts with why we review and what reviews are not for, hands everything mechanical to tooling, and keeps a short list of things only a human can judge, with the .NET-specific traps that slip through most often.8 min read
  13. CodeQL for .NET teams — a security gate that actually gatesA CodeQL workflow that nobody looks at, findings nobody triages, and a scan that silently stopped working on self-hosted Windows runners. How to set up CodeQL for C# so it's fast, consistent across repositories, blocks merges on real findings, and keeps running.8 min read