What runs everything

Most changes select a few test classes. Some cannot be narrowed down safely, so TestDetta runs a whole test project, or every project below a folder. This page lists them all, so a wide selection never comes as a surprise.

Build-wide files

These files change how every project below them builds. A change to one of them runs every test project in its folder and below it:

FileRuns
Directory.Build.props, Directory.Build.targets, Directory.Build.rspEvery test project below it
Directory.Solution.props, Directory.Solution.targetsEvery test project below it
global.json, NuGet.config, .editorconfigEvery test project below it
Directory.Packages.props, only PackageVersion items changedOnly the test projects that reference a changed package, and those that depend on them
Directory.Packages.props, anything else (a GlobalPackageReference, transitive pinning, properties)Every test project below it

Changes that run a whole test project

ChangeWhy it cannot be narrowed
The project file, or a .props or .targets file it importsIt can change how anything in the project builds.
Any file in the project that is not C#, such as appsettings.json, a .resx or a test data fileNo coverage map says who reads it.
A global using or an assembly attributeIt applies to every file.
A C# change in code no declaration covers, for example under a preprocessor conditionThere is no member to follow.
A changed type that nothing names, but that a framework could discover through reflection (controllers, message handlers, EF configurations)Names and coverage cannot tell who finds it.
A change in an F# or Visual Basic projectTheir code is not analysed.
A project used as an analyzer or source generatorIts effect is on compilation, not on calls.

Each of these also runs every test project that depends on the one affected.

Coverage map situations

No map at all does not run everything: selection falls back to tracing by name, which is wider than coverage but still narrow.

Files that are ignored

A changed file outside every project folder, such as README.md, files under .github/ or a script at the root of the repository, belongs to no project and selects nothing. It is listed in the output as unmapped.

If your tests read a file that lives outside every project folder, a change to it will not select them. Keep such files inside the test project, or list them as its items, for example <None Include="..\..\testdata\**" CopyToOutputDirectory="PreserveNewest" />. Then the file belongs to the project wherever it lives, and changing or deleting it runs the project.

One exception: a source or build file that no project claims (.cs, .fs, .vb, .props, .targets, .projitems) counts as a build input of every project whose imports could not be fully resolved, so those run.