dotnet-proj-diff 0.0.13

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet tool install --global dotnet-proj-diff --version 0.0.13
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local dotnet-proj-diff --version 0.0.13
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dotnet-proj-diff&version=0.0.13
                    
nuke :add-package dotnet-proj-diff --version 0.0.13
                    

dotnet-proj-diff

NuGet Version GitHub License

Documentation

dotnet-proj-diff identifies added, modified, and deleted projects between Git references, making it particularly useful for CI/CD pipelines to determine which projects need to be rebuilt or tested.

Heavily inspired by dotnet-affected

Installation

# Install globally
dotnet tool install --global dotnet-proj-diff

# Or install locally
dotnet new tool-manifest # if you don't have one
dotnet tool install dotnet-proj-diff

Usage

Description:
  Calculate which projects in a solution has changed since a specific commit

Usage:
  dotnet-proj-diff [options]

Options:
  -?, -h, --help                                                     Show help and usage information
  --version                                                          Show version information
  --solution                                                         Path to solution file to derive projects from
  --base, --base-ref (REQUIRED)                                      Base git reference to compare against, if not specified 'HEAD' will be used [default: HEAD]
  --head, --head-ref                                                 Head git reference to compare against. If not specified current working tree will be used
  --merge-base                                                       If true instead of using --base use the merge base of --base and --head as the --base reference, if --head is not specified 'HEAD' will be used [default: True]
  --include-deleted                                                  If true deleted projects will be included in output [default: False]
  --include-modified                                                 If true modified projects will be included in output [default: True]
  --include-added                                                    If true added projects will be included in output [default: True]
  --include-referencing                                              if true  projects referencing modified/deleted/added projects will be included in output [default: True]
  --absolute-paths                                                   Output absolute paths, if not specified paths will be relative to the working directory. Or relative to --output if specified. This option will not affect slnf format as this requires relative paths [default: False]
  -f, --format <Json|Plain|Slnf|Traversal>                           Output format, if --output is specified format will be derived from file extension. Otherwise this defaults to 'plain'
  -o, --out, --output                                                Output file, if not set stdout will be used
  --ignore-changed-file                                              Ignore changes in specific files. If these files are a part of the build evaluation process they will still be evaluated, however these files will be considered unchanged by the diff process []
  --log-level <Critical|Debug|Error|Information|None|Trace|Warning>  Set the log level for the command [default: Warning]
  --msbuild-traversal-version                                        Set the version of the Microsoft.Build.Traversal SDK when using traversal output format
  --exclude-projects                                                 Exclude projects from the output, can be matched multiple times, supports glob patterns
  --include-projects                                                 Include only projects matching the specified patterns, can be matched multiple times, supports glob patterns

The cli should have some sensible defaults, so you can run it without any arguments and get a list of projects that have changed in the working tree and are available to build.

Examples

# Get all projects in a solution that have changed since the last commit in 'main'
dotnet-proj-diff MySolution.sln --base main
# Get all projects that have changed in working tree, including deleted projects
dotnet-proj-diff --base HEAD --include-deleted
# Get all changed projects between two branches
dotnet-proj-diff --base main --head feature/new-feature

# Test all projects that have changed in working tree
dotnet-proj-diff --base HEAD | dotnet test

# Test all changed test projects in test/ directory
dotnet-proj-diff --include-projects test/**/*.csproj | dotnet test

CI/CD Integration examples

GitHub Actions

Product 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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.0.14-preview.0.4 10 8/19/2025
0.0.14-preview.0.3 10 8/19/2025
0.0.14-preview.0.2 9 8/19/2025
0.0.14-preview.0.1 10 8/19/2025
0.0.13 181 8/7/2025
0.0.13-preview.0.1 185 8/6/2025
0.0.12 88 7/30/2025
0.0.12-preview.0.4 87 7/30/2025
0.0.12-preview.0.3 88 7/28/2025
0.0.12-preview.0.2 438 7/24/2025
0.0.12-preview.0.1 433 7/24/2025
0.0.11 486 7/23/2025
0.0.11-preview.0.4 479 7/23/2025