DotBump 0.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global DotBump --version 0.3.0
                    
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 DotBump --version 0.3.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=DotBump&version=0.3.0
                    
nuke :add-package DotBump --version 0.3.0
                    

DotBump

.NET tool to automate dependency upgrade tasks in .NET solutions.

Release NuGet Version Pre Release Quality Gate Status

Requirements

DotBump targets .NET 8 and requires .NET 8 or later.

Installation

dotnet tool install DotBump

Usage

USAGE:
    dotnet dotbump [OPTIONS] <COMMAND>

COMMANDS:
    sdk       Bump the global.json SDK version
    tools     Bump the local .NET tools versions
    packages  Bump the NuGet package versions

OPTIONS:
    -h, --help       Prints help information
    -v, --version    Prints version information

Report formats

All three commands accept --output to write a report. The format is inferred from the file extension:

  • .json — the full, machine-readable report, including every scanned entry, its old and new version, and the warnings and errors arrays. This is the default for any other extension.
  • .md (or .markdown) — a concise markdown report intended as the content for an automated dependency-update pull request. It lists only what changed, plus any warnings and errors. When there is nothing to report, an existing markdown report at that path is removed, so a reused output path never yields stale content.
## Packages

- Newtonsoft.Json: 12.0.1 → 13.0.3
- Serilog: 3.0.0 → 3.0.1

### Warnings

- Skipping 'Floating.Package' because version '1.2.\*' is not supported.

Automated dependency updates

See the dependency-update workflow for an end-to-end example that bumps the SDK, tools and NuGet packages and opens a pull request from the markdown reports.

Features

Bump the .NET SDK version

Bump the global.json SDK version to the latest specified SDK version based on the current release index.

DESCRIPTION:
Bump the global.json SDK version. Use the 'minor' type option to bump the SDK to
the latest minor or patch version for the current major version. Use the 'patch'
type option to bump the SDK to the latest patch version for the current minor
version.

USAGE:
    dotnet dotbump sdk [OPTIONS]

EXAMPLES:
    dotnet dotbump sdk
    dotnet dotbump sdk --type patch
    dotnet dotbump sdk --file ./other/global.json --output bump-sdk-report.json
    dotnet dotbump sdk --security-only true --debug true --logfile bump-sdk-log.txt


OPTIONS:
    -h, --help             Prints help information                              
        --debug            Enable debug logging for troubleshooting. Includes   
                           response data                                        
        --logfile          The file to send the log output to                   
    -t, --type             The bump type. Defaults to `minor`. Available options
                           are `minor` and `patch`                              
    -f, --file             The global.json file to update. Defaults to          
                           `./global.json`                                      
    -o, --output           Output file name. The name of the file to write the  
                           result to. The output format is inferred from the    
                           file extension: `.json` or `.md`                     
    -s, --security-only    Only bump the version if the new release is a        
                           security release. Defaults to false      

Bump the Local .NET Tools versions


DESCRIPTION:
Bump the local .NET tools versions. Use the 'minor' type option to bump the tools to
the latest minor or patch versions for the current major version. Use the 'patch' type 
option to bump the tools to the latest patch version for the current minor version. 

USAGE:
    dotnet dotbump tools [OPTIONS]

EXAMPLES:
    dotnet dotbump tools
    dotnet dotbump tools --type patch
    dotnet dotbump tools --manifest ./other/dotnet-tools.json
    dotnet dotbump tools --config ./custom-nuget.config --output bump-tools-report.json
    dotnet dotbump tools --debug true --logfile bump-tools-log.txt


OPTIONS:
    -h, --help       Prints help information                                                                 
        --debug      Enable debug logging for troubleshooting. Includes response data                        
        --logfile    The file to send the log output to                                                      
    -t, --type       The bump type. Defaults to `minor`. Available options are `minor` and `patch`           
    -o, --output     Output file name. The name of the file to write the result
                     to. The output format is inferred from the file extension:
                     `.json` or `.md`
    -c, --config     The nuget config file to use. Defaults to `./nuget.config`                             
    -m, --manifest   The tools manifest file to update. Defaults to                                        
                     `./dotnet-tools.json`, falling back to `./.config/dotnet-tools.json`                   

Pre-releases

If the current .NET tool version is a pre-release version, pre-release versions will be taken into account for new versions, but stable versions will be preferred. If the current .NET tool version is a stable version, only stable versions will be taken into account for new versions.

Examples:

Current version: 1.0.0-beta.1
Available versions: 1.0.0-beta.2, 1.0.0
Bump to: 1.0.0
Current version: 1.0.0-beta.1
Available versions: 1.0.1-beta.1, 1.0.0
Bump to: 1.0.0
Current version: 1.0.1-beta.1
Available versions: 1.0.1-beta.2, 1.0.0
Bump to: 1.0.1-beta.2
Private Feeds

Private feeds are supported using environment variables.

See credentials in NuGet config files and using environment variables for more information.

The username and plain text password in a nuget.config file can use an environment variable by adding % to the beginning and end of the environment variable name you would like to use.

Example:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <clear />
    <add key="myfeed" value="https://nuget.pkg.github.com/robyvandamme/index.json" protocolVersion="3" />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
  <packageSourceCredentials>
    <myfeed>
      <add key="Username" value="%PRIVATE_GITHUB_FEED_USER%" />
      <add key="ClearTextPassword" value="%PRIVATE_GITHUB_FEED_PASSWORD%" />
    </myfeed>
  </packageSourceCredentials> 
</configuration>

Bump the NuGet Package versions

Bump the versions of NuGet packages referenced in a repository.

Use the minor type option to bump the packages to the latest minor or patch version for the current major version. Use the patch type option to bump the packages to the latest patch version for the current minor version.

The command scans the directory passed via --path (defaults to the current directory) recursively and takes the following files into account:

File Contents
*.csproj, *.fsproj, *.vbproj <PackageReference> entries, where the version can be a Version attribute, a <Version> child element or a VersionOverride attribute.
Directory.Packages.props Central Package Management <PackageVersion> and <GlobalPackageReference> entries.
Directory.Build.props, Directory.Build.targets Shared <PackageReference>, <PackageVersion> and <GlobalPackageReference> entries.

The package id is read from the Include attribute, or, for override entries, the Update attribute. The version is read from a Version attribute, a <Version> child element or a VersionOverride attribute.

Directories named bin, obj, .git, .vs and node_modules are skipped. Additional directories can be skipped with --exclude (repeatable), for example to avoid scanning test data: dotnet dotbump packages --exclude ./test/DotBump.Tests/Data. Like --path, each --exclude path is resolved relative to the current working directory, not to --path. Path matching is case-sensitive: on a case-insensitive filesystem the directory must be passed with its exact on-disk casing, otherwise it is not excluded.

DESCRIPTION:
Bump the NuGet package versions. Use the 'minor' type option to bump the
packages to the latest minor or patch versions for the current major version.
Use the 'patch' type option to bump the packages to the latest patch version for
the current minor version.

USAGE:
    dotnet dotbump packages [OPTIONS]

EXAMPLES:
    dotnet dotbump packages
    dotnet dotbump packages --type patch
    dotnet dotbump packages --path ./src --config ./custom-nuget.config --output bump-packages-report.json
    dotnet dotbump packages --exclude ./test/DotBump.Tests/Data
    dotnet dotbump packages --debug true --logfile bump-packages-log.txt

OPTIONS:
    -h, --help       Prints help information
        --debug      Enable debug logging for troubleshooting. Includes response data
        --logfile    The file to send the log output to
    -t, --type       The bump type. Defaults to `minor`. Available options are `minor` and `patch`
    -o, --output     Output file name. The name of the file to write the result
                     to. The output format is inferred from the file extension:
                     `.json` or `.md`
    -c, --config     The nuget config file to use. Defaults to `./nuget.config`
    -p, --path       The root directory to scan. Defaults to the current directory
    -e, --exclude    A directory to exclude from the scan. Can be specified
                     multiple times

The output file (--output) uses the same report formats as the sdk and tools commands (see Report formats), and the command returns exit code 1 when an error occurs (for example an invalid NuGet configuration).

How versions are bumped
  • All occurrences of the same package id across the repository are bumped to a single target version.
  • The highest currently referenced version is used as the starting point for resolving a newer version, so an occurrence is never downgraded. If an occurrence happens to be below the resolved target it is upgraded to the target as well.
  • If no newer version is found, the package is left unchanged.
  • Pre-release handling matches the local tools: if the current version is a pre-release, pre-release versions are considered but stable versions are preferred; otherwise only stable versions are considered.
  • Only files that actually change are written back, and only the version value is changed; everything else (attribute quoting, entities, attribute layout, XML declaration, encoding, byte order mark and line endings) is preserved.
Private feeds

Private feeds are configured through nuget.config in the same way as for the local tools. See Private Feeds above.

Limitations

The following are intentionally not supported yet. Packages that use them are skipped, leaving the existing value untouched:

  • Version ranges (e.g. Version="[1.0.0, 2.0.0)").
  • Floating versions (e.g. Version="1.2.*").
  • MSBuild version properties (e.g. Version="$(MyPackageVersion)").

Skipped packages are listed under warnings in the output report, so automated runs (for example a dependency-update PR that embeds the report) can surface them without extra debugging. They are also logged at warning level; run with --debug true to see them in the log.

Other current limitations:

  • MSBuild Condition attributes are ignored, so conditionally referenced packages are treated as active.
  • Symlinked files and directories are skipped; only regular files are scanned.
  • Explicit <Import ... /> elements are not followed; only the conventional Directory.Build.props, Directory.Build.targets, Directory.Packages.props and project files are scanned.
  • packages.lock.json files are not updated.
  • A <PackageReference> without a version (the usual Central Package Management setup) is ignored, because its version is defined by the corresponding <PackageVersion> in Directory.Packages.props, which is scanned instead.
  • Update= override entries are currently treated the same as Include entries: all occurrences of the same package id are unified to a single target version. The intended semantics — in particular overriding a package that is also referenced with Include — are not decided yet, so treat Update= as unsupported for now.
Feedback

This feature is new. If a package or file format in your repository is not detected correctly, or a version is resolved unexpectedly, please open an issue with a minimal reproduction (the relevant project/props file and the package you expected to be bumped) and a debug log file. You can generate one by running the command with --debug true --logfile bump-packages-log.txt, for example:

dotnet dotbump packages --debug true --logfile bump-packages-log.txt

Please review the log before attaching it and redact anything sensitive.

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 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. 
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.5.0 108 11/20/2026
0.4.0 182 10/27/2026
0.3.0 121 10/20/2026
0.3.0-beta.34 71 10/20/2026
0.2.1 704 12/14/2025
0.2.0 496 11/18/2025
0.1.0 515 8/6/2025
0.1.0-beta.14 161 8/1/2025