Incrementalist.Cmd
1.0.0-beta1
See the version list below for details.
dotnet tool install --global Incrementalist.Cmd --version 1.0.0-beta1
dotnet new tool-manifest
dotnet tool install --local Incrementalist.Cmd --version 1.0.0-beta1
#tool dotnet:?package=Incrementalist.Cmd&version=1.0.0-beta1&prerelease
nuke :add-package Incrementalist.Cmd --version 1.0.0-beta1
🔄 Incrementalist
Incrementalist is a .NET tool that leverages libgit2sharp and Roslyn to compute incremental build steps for large .NET solutions. It helps optimize your CI/CD pipeline by building and testing only the projects affected by your changes.
🎯 When to Use Incrementalist
Incrementalist is particularly valuable for:
- 🏗️ Large Solutions: If your solution contains dozens or hundreds of projects, Incrementalist can significantly reduce build times by only building what's necessary.
- 📦 Monorepos: When managing multiple applications or services in a single repository, Incrementalist helps identify and build only the affected components.
- 🌐 Microservice Architectures: In repositories containing multiple microservices, build only the services impacted by your changes.
- 🔗 Complex Dependencies: When projects have intricate dependencies, Incrementalist automatically determines the complete build graph.
- ⚡ CI/CD Optimization: Reduce CI/CD pipeline execution time by skipping unnecessary builds and tests.
⚙️ Requirements
- .NET 8.0 SDK or later
- Git installed and available in the system PATH
📥 Installation
Incrementalist is available in two forms:
- Incrementalist Library - a .NET 8 library for programmatic use
- Incrementalist.Cmd - a
dotnet tool
for command-line use (recommended)
Install the command-line tool globally:
dotnet tool install --global Incrementalist.Cmd
🚀 Quick Start Examples
# Get list of affected projects and save to file
incrementalist -b dev -f ./affected-projects.txt
# Specify solution explicitly
incrementalist -s ./src/MySolution.sln -b dev -f ./affected-projects.txt
# Get list of affected folders
incrementalist -b dev -l -f ./affected-folders.txt
# Build only affected projects
incrementalist -b dev -r -- build -c Release --nologo
# Run tests for affected projects
incrementalist -b dev -r -- test -c Release --no-build --nologo
# Run tests with code coverage
incrementalist -b dev -r -- test -c Release --no-build --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=./coverage/
# Save affected projects AND run commands
incrementalist -b dev -f ./affected-projects.txt -r -- build -c Release --nologo
📄 Output Files
Incrementalist can generate two types of output files using -f, --file
:
Project Lists (default):
D:\src\Project1\Project1.csproj,D:\src\Project2\Project2.csproj
Folder Lists (with
-l, --folders-only
):D:\src\Project1,D:\src\Project2\SubFolder
These files can be used in build scripts, CI/CD pipelines, or other automation tools.
🛠️ Command-Line Options
-s, --sln Optional. Solution file to analyze. Uses first .sln in
current directory if not specified.
-f, --file Optional. Write output to the specified file.
-l, --folders-only Optional. List affected folders instead of projects.
-b, --branch Required. (Default: dev) Git branch to compare against
(e.g., 'dev' or 'master').
-d, --dir Optional. Working directory. Defaults to current directory.
--verbose Optional. (Default: false) Enable debug logging.
-t, --timeout Optional. (Default: 2) Solution load timeout in minutes.
-r, --run Optional. Run dotnet CLI command against affected projects.
All arguments after -- are passed to dotnet.
--continue-on-error Optional. (Default: true) Continue executing commands even
if some fail.
--parallel Optional. (Default: false) Execute commands in parallel.
--fail-on-no-projects Optional. (Default: false) Fail if no projects are affected.
--help Display help screen.
--version Display version information.
⚡ Running Commands
Execute dotnet CLI commands against affected projects:
# Build affected projects
incrementalist -b dev -r -- build -c Release --nologo
# Run tests
incrementalist -b dev -r -- test -c Release --no-build --nologo
# Run in parallel
incrementalist -b dev -r --parallel -- build -c Release --nologo
# Stop on first error
incrementalist -b dev -r --continue-on-error=false -- build -c Release --nologo
📚 Documentation
- 🔍 How It Works - Technical details and architecture
- 🏗️ Building from Source - Build instructions and development setup
📜 License
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last Updated |
---|---|---|
1.1.0-beta1 | 2,797 | 5/12/2025 |
1.0.0 | 21,830 | 4/18/2025 |
1.0.0-rc5 | 882 | 4/17/2025 |
1.0.0-rc4 | 213 | 4/17/2025 |
1.0.0-rc3 | 213 | 4/16/2025 |
1.0.0-rc2 | 396 | 4/14/2025 |
1.0.0-rc1 | 298 | 4/13/2025 |
1.0.0-beta4 | 813 | 2/25/2025 |
1.0.0-beta3 | 174 | 2/25/2025 |
1.0.0-beta2 | 181 | 2/24/2025 |
1.0.0-beta1 | 166 | 2/21/2025 |
0.9.0 | 51,344 | 11/22/2023 |
0.8.0 | 34,891 | 11/24/2022 |
0.7.0 | 12,685 | 5/24/2022 |
0.6.0 | 30,065 | 11/10/2021 |
0.5.0 | 1,061 | 6/16/2021 |
0.4.0 | 25,148 | 12/23/2020 |
0.3.0 | 862 | 9/26/2020 |
0.2.2 | 38,390 | 2/14/2020 |
0.2.1 | 6,367 | 11/18/2019 |
0.2.0 | 2,126 | 10/29/2019 |
0.1.7 | 3,342 | 9/9/2019 |
0.1.6 | 855 | 8/30/2019 |
0.1.5 | 794 | 8/30/2019 |
0.1.4 | 3,841 | 5/17/2019 |
0.1.3 | 895 | 5/15/2019 |
0.1.2 | 815 | 5/8/2019 |
0.1.1 | 780 | 5/8/2019 |
0.1.0 | 859 | 5/3/2019 |
Major new feature: Built-in `dotnet` command execution support! You can now run commands directly on affected projects:
```shell
# Build only affected projects
incrementalist -b dev -r -- build -c Release --nologo
# Run tests for affected projects
incrementalist -b dev -r -- test -c Release --no-build --nologo
# Run in parallel for faster execution
incrementalist -b dev -r --parallel -- build -c Release --nologo
```
Added command execution support with new options:
`-r, --run` - Run dotnet CLI commands against affected projects;
`--parallel` - Execute commands in parallel for faster builds;
`--continue-on-error` - Continue executing if some commands fail;
`--fail-on-no-projects` - Return error if no projects are affected;
Improved MSBuild file detection:
Now properly detects changes in `Directory.Build.props`;
Better handling of shared MSBuild files and project dependencies;
Enhanced project dependency analysis for more accurate incremental builds;
Improved error handling and logging throughout; and
Upgraded all dependencies to their latest stable versions.