Skip to content
v7 is in preview. Install it with dotnet tool install dotnet-affected --prerelease, and see what changed since v6.

dotnet-affected

Build and test only the projects your changes actually affect.

dotnet-affected compares your working tree against a baseline commit — a branch or the last successful build in CI, HEAD by default — and works out which MSBuild projects changed and which projects depend on them.

Detects changed projects

Maps every changed file to the project that references it, including files that are not source code.

Follows the dependency graph

Uses the MSBuild ProjectGraph to find every project transitively affected by a change.

Tracks NuGet packages

With Central Package Management, detects added, removed and updated packages in Directory.Packages.props.

Watches build inputs

Changes to Directory.Build.props, .targets and other imported files are picked up too.

Outputs what you need

A Traversal SDK project you can dotnet build, or plain text and JSON for other tooling.

Works with your projects

.csproj, .fsproj and .vbproj, in both SDK and non-SDK style.

CLI reference

Every option, including --filter-file-path and the exclusion flags.