DotBump 0.5.0
dotnet tool install --global DotBump --version 0.5.0
dotnet new tool-manifest
dotnet tool install --local DotBump --version 0.5.0
#tool dotnet:?package=DotBump&version=0.5.0
nuke :add-package DotBump --version 0.5.0
DotBump
.NET tool to automate dependency upgrades and project file maintenance in .NET solutions.
Requirements
DotBump targets .NET 10 and requires .NET 10 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 and project SDK versions
frameworks Bump the target framework versions
language Bump the C# language version
docker Bump the .NET SDK base image tag in Dockerfiles
OPTIONS:
-h, --help Prints help information
-v, --version Prints version information
Automated dependency updates
See the dependency-update and major dependency-update workflows for end-to-end examples that bump the SDK, local tools and NuGet packages and open a pull request from the markdown reports. The major workflow additionally aligns target frameworks and the C# language version to the SDK.
Commands
sdk
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. Use the 'major' type option to bump the SDK to the latest version,
including versions with a higher major version. Use '--prerelease' with the
'major' type to include pre-release versions.
USAGE:
dotnet dotbump sdk [OPTIONS]
EXAMPLES:
dotnet dotbump sdk
dotnet dotbump sdk --type patch
dotnet dotbump sdk --type major
dotnet dotbump sdk --type major --prerelease
dotnet dotbump sdk --file ./other/global.json --output bump-sdk-report.json
dotnet dotbump sdk --security-only --debug --logfile bump-sdk-log.txt
OPTIONS:
-h, --help Prints help information
-t, --type The bump type. Defaults to `minor`. Available options
are `minor`, `patch` and `major`
-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 a security release newer
than the current SDK version exists. Defaults to
false
--prerelease Include pre-release SDK versions when bumping. Only
applies to `major` bumps. Defaults to false
--debug Enable debug logging for troubleshooting. Includes
response data
--logfile The file to send the log output to
tools
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. Use the 'major' type option to bump the tools to the
latest version, including versions with a higher major version. Use
'--prerelease' with the 'major' type to include pre-release versions.
USAGE:
dotnet dotbump tools [OPTIONS]
EXAMPLES:
dotnet dotbump tools
dotnet dotbump tools --type patch
dotnet dotbump tools --type major
dotnet dotbump tools --type major --prerelease
dotnet dotbump tools --type major --skip-tool "dotnet-*"
dotnet dotbump tools --manifest ./other/dotnet-tools.json
dotnet dotbump tools --config ./custom-nuget.config --output bump-tools-report.json
dotnet dotbump tools --debug --logfile bump-tools-log.txt
OPTIONS:
-h, --help Prints help information
-t, --type The bump type. Defaults to `minor`. Available options are
`minor`, `patch` and `major`
-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`
--skip-tool A tool id or pattern (`*` and `?` supported) to skip when
bumping. Can be specified multiple times or as a
comma-separated list
--prerelease Include pre-release versions when bumping. Only applies to
`major` bumps. Defaults to false
--debug Enable debug logging for troubleshooting. Includes response
data
--logfile The file to send the log output to
packages
DESCRIPTION:
Bump the NuGet package versions and versioned MSBuild project SDK references.
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. Use the
'major' type option to bump the packages to the latest version, including
versions with a higher major version. Use '--prerelease' with the 'major' type
to include pre-release versions.
USAGE:
dotnet dotbump packages [OPTIONS]
EXAMPLES:
dotnet dotbump packages
dotnet dotbump packages --type patch
dotnet dotbump packages --type major
dotnet dotbump packages --type major --prerelease
dotnet dotbump packages --type major --prerelease --skip-package "Microsoft.*"
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 --logfile bump-packages-log.txt
OPTIONS:
-h, --help Prints help information
-t, --type The bump type. Defaults to `minor`. Available options
are `minor`, `patch` and `major`
-c, --config The nuget config file to use. Defaults to `./nuget.config`
--skip-package A package id or pattern (`*` and `?` supported) to skip
when bumping. Can be specified multiple times or as a
comma-separated list
--prerelease Include pre-release versions when bumping. Only applies
to `major` bumps. Defaults to false
-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. Relative paths are resolved against the
current directory, not the scan root given by --path
-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`
--debug Enable debug logging for troubleshooting. Includes
response data
--logfile The file to send the log output to
Scanned files
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. Versioned project SDK references in the root Sdk attribute and in <Sdk> elements. |
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. The effective
Condition is the element's own Condition combined with the conditions of its enclosing elements; occurrences with
different conditions are treated as independent package variants.
Condition matching is textual. Values are trimmed, enclosing conditions are joined with &&, and the result is
compared ordinally. Semantically equivalent expressions with different formatting or structure — for example
'$(TargetFramework)'=='net10.0' versus '$(TargetFramework)' == 'net10.0' — are therefore separate variants.
Conditions using ||, negation, or implied conditions are not simplified.
Project SDK references are supported in both forms:
<Project Sdk="Aspire.AppHost.Sdk/13.0.1">
<Project Sdk="Microsoft.NET.Sdk;Aspire.AppHost.Sdk/13.0.1">
<Sdk Name="Aspire.AppHost.Sdk" Version="13.0.1" />
</Project>
The SDK id is resolved as a NuGet package, so --skip-package applies to SDK references too. Only SDK references with
an explicit version are bumped; unversioned SDKs such as Microsoft.NET.Sdk are ignored. The version is the only part
of the SDK reference that is rewritten. SDK references declared on <Import ... /> elements are not detected yet; use
the Sdk attribute or an <Sdk> element.
Version resolution
- Occurrences of the same package id are grouped by their effective MSBuild
Conditionand each group is bumped independently. Occurrences with the same condition are bumped to a single target version; occurrences with different conditions (for example per-target-frameworkPackageReferenceentries) are resolved against their own current version and never collapsed into one version. - The highest currently referenced version within a group is used as the starting point for resolving a newer version, so an occurrence is never downgraded. If an occurrence in the same group happens to be below the resolved target it is upgraded to the target as well.
- If no newer version is found, the package group is left unchanged.
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 to see them in the log.
Other current limitations:
- MSBuild
Conditionexpressions are not evaluated, so conditionally referenced packages are treated as active. Conditions are still used as part of the package identity, which keeps per-target-framework versions independent. - Explicit
<Import ... />elements are not followed; only the conventionalDirectory.Build.props,Directory.Build.targets,Directory.Packages.propsand project files are scanned. Versioned SDK references declared on<Import ... />elements (for example<Import Project="Sdk.props" Sdk="My.Custom.Sdk" Version="1.2.3" />) are not bumped yet either. packages.lock.jsonfiles 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>inDirectory.Packages.props, which is scanned instead. Update=override entries are currently treated the same asIncludeentries: all occurrences of the same package id and effective condition are unified to a single target version. The intended semantics — in particular overriding a package that is also referenced withInclude— are not decided yet, so treatUpdate=as unsupported for now.
frameworks
DESCRIPTION:
Bump the target framework versions. Aligns `<TargetFramework>` values to the SDK
major version in global.json
USAGE:
dotnet dotbump frameworks [OPTIONS]
EXAMPLES:
dotnet dotbump frameworks
dotnet dotbump frameworks --file ./other/global.json --path ./src
dotnet dotbump frameworks --exclude ./test --output bump-frameworks-report.md
dotnet dotbump frameworks --debug --logfile bump-frameworks-log.txt
OPTIONS:
-h, --help Prints help information
-f, --file The global.json file used to determine the target versions. Defaults to `./global.json`
-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. Relative paths are resolved against the current
directory, not the scan root given by --path
-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`
--debug Enable debug logging for troubleshooting. Includes response data
--logfile The file to send the log output to
The command reads sdk.version from --file (defaults to ./global.json), derives net{major}.0, and updates
<TargetFramework> in *.csproj, *.fsproj, *.vbproj, Directory.Build.props and Directory.Build.targets.
Platform suffixes such as -windows and -ios are preserved, so only the framework version changes.
The framework is aligned to the SDK major in both directions: a project targeting a lower or higher major than the SDK is moved to the SDK major, keeping the project and SDK in sync.
Limitations
- Only
<TargetFramework>is supported for now. Files that contain<TargetFrameworks>are skipped with a warning, so multi-target projects are left untouched. netstandard*,net4x,netcoreapp*, MSBuild property expressions such as$(TargetFramework)and other unsupported values are left unchanged.- SDK versions below .NET 5 are rejected because those SDKs use
netcoreapp*target frameworks rather than the modernnetX.0format.
language
DESCRIPTION:
Bump the C# language version. The language version is derived from the SDK major
version in global.json as SDK major + 4. Only explicit numeric LangVersion values
in C# projects and shared MSBuild files are bumped
USAGE:
dotnet dotbump language [OPTIONS]
EXAMPLES:
dotnet dotbump language
dotnet dotbump language --file ./other/global.json --path ./src
dotnet dotbump language --output bump-language-report.json
dotnet dotbump language --debug --logfile bump-language-log.txt
OPTIONS:
-h, --help Prints help information
-f, --file The global.json file used to determine the target versions. Defaults to `./global.json`
-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. Relative paths are resolved against the current
directory, not the scan root given by --path
-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`
--debug Enable debug logging for troubleshooting. Includes response data
--logfile The file to send the log output to
The command reads sdk.version from --file (defaults to ./global.json) and derives the target language version as
the SDK major plus four, formatted as major.0: .NET 5 maps to C# 9.0, .NET 8 to C# 12.0 and .NET 10 to C# 14.0. Only
*.csproj, Directory.Build.props and Directory.Build.targets are scanned; F# and Visual Basic projects are
ignored.
Only existing numeric <LangVersion> values are considered, and they are bumped upward only.
Limitations
- Values such as
latest,latestMajor,preview,default, MSBuild property expressions such as$(LangVersion)and missing values are left unchanged. - SDK versions below .NET 5 are rejected because the SDK major cannot be mapped reliably to a C# version.
docker
DESCRIPTION:
Bump .NET base image tags in Dockerfiles and Containerfiles. Supports the
`mcr.microsoft.com/dotnet/sdk`, `aspnet`, `runtime` and `runtime-deps` images.
Each image is bumped within its own current .NET channel (and its own minor for
'patch'); the 'major' type moves every image to the latest release. Use the
'minor' type option to bump each image to the latest minor or patch version for
its current major version. Use the 'patch' type option to bump each image to
the latest patch version for its current minor version. Use the 'major' type
option to bump every image to the latest version, including versions with a
higher major version. A channel whose release history cannot be read is skipped
with a warning. Use '--prerelease' with the 'major' type to include pre-release
versions.
USAGE:
dotnet dotbump docker [OPTIONS]
EXAMPLES:
dotnet dotbump docker
dotnet dotbump docker --type patch
dotnet dotbump docker --type major
dotnet dotbump docker --type major --prerelease
dotnet dotbump docker --path ./src --output bump-docker-report.md
dotnet dotbump docker --debug --logfile bump-docker-log.txt
OPTIONS:
-h, --help Prints help information
-t, --type The bump type. Defaults to `minor`. Available options are
`minor`, `patch` and `major`
-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. Relative paths are resolved against the
current directory, not the scan root given by --path
-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`
--prerelease Include pre-release SDK versions when bumping. Only applies
to `major` bumps. Defaults to false
--debug Enable debug logging for troubleshooting. Includes response
data
--logfile The file to send the log output to
The command scans Dockerfile, Dockerfile.*, *.dockerfile (including *.Dockerfile) and Containerfile, and
updates the tag of every supported FROM instruction: mcr.microsoft.com/dotnet/sdk, aspnet, runtime and
runtime-deps. Each image version comes from the release history (releases.json) of its channel; the release index
is used to find and validate that history URL. The SDK image is tagged with the release's SDK version, aspnet with
the ASP.NET Core runtime version, and runtime/runtime-deps with the runtime version.
Images are bumped per channel rather than all to a single version. With minor and patch, each image stays on its
current .NET channel and is updated to the latest release in that channel. A repository with images on .NET 10 and
.NET 11 therefore keeps both channels and moves each to its own latest version. major removes the channel cap and
moves every image to the latest release. For aspnet, runtime and runtime-deps, minor and patch are
equivalent because those images have no SDK feature bands. Pre-release versions follow the shared version selection
rules.
If a channel's release history cannot be loaded, that channel is skipped: its images keep their current tags, a warning is added to the report, and the other channels are still bumped. The command still exits normally.
Only fully versioned tags are supported: major.minor.patch with an optional alpha, beta, rc or preview
suffix. All other images are ignored. For a supported image, the following are left unchanged and listed under
warnings in the output report:
latest, floating tags such as10.0, and variant tags such as10.0.15-nobleor10.0.15-alpine3.24.- Digest-pinned images (
...@sha256:...). - Tags that use build arguments (
${SDK_VERSION}).
Multi-line FROM instructions are also skipped and reported as warnings, because the instruction cannot be rewritten
reliably without joining physical lines.
Limitations
- Only the
mcr.microsoft.com/dotnet/sdk,aspnet,runtimeandruntime-depsimages are supported. Other .NET images, other registries,docker-compose.ymland.devcontainerfiles are left untouched. - Floating tags are not pinned to a fully versioned release. Projects that want the command to update an image must use a fully versioned tag.
- The resolved image tag is not validated against the Microsoft Container Registry, because the version comes from the .NET release history. The history and the published images are released together, but an unavailable image tag would only surface when the image is pulled.
- Variant and OS suffixes (for example
-noble,-alpine3.24) are not supported yet and are reported as warnings.
Common behaviour
Version selection and pre-releases
The sdk, tools, packages and docker commands share the same version selection rules. For docker, the rules
are applied per channel and per image family (SDK, ASP.NET Core, runtime).
minorandpatchstay within the current major or minor version.majorremoves the major-version cap, consistent with howminorincludes patch releases. It therefore also selects a newer minor or patch version when no higher major version is available, and only leaves the entry unchanged when nothing newer exists.- If the current version is stable, only stable versions are considered. If the current version is a pre-release, pre-release versions are considered but stable versions are preferred.
- Use
--prereleasewithmajorto include pre-release versions and select the highest version available, whether stable or pre-release.
Skipping updates
Tools and packages can be excluded from a bump with --skip-tool and --skip-package respectively. Skipped entries
are left at their current version and are not looked up on the NuGet feeds at all.
The options accept exact ids and wildcard patterns. * matches zero or more characters and ? matches exactly one
character; matching is case-insensitive. Patterns can be specified multiple times or as a comma-separated list:
dotnet dotbump tools --type major --skip-tool "dotnet-*" --skip-tool "GitVersion.*"
dotnet dotbump tools --type major --skip-tool "dotnet-*,GitVersion.*"
dotnet dotbump packages --type major --prerelease --skip-package "Microsoft.*,System.*"
Quote patterns in bash/zsh so the shell does not expand them as file globs. Every skipped entry is listed under
warnings in the output report, for example:
### Warnings
- Skipping tool 'dotnet-ef' because it matches --skip-tool pattern 'dotnet-*'.
- Skipping 'Microsoft.Extensions.Logging' because it matches --skip-package pattern 'Microsoft.*'.
Private NuGet feeds
Private feeds are supported for tools and packages using environment variables.
If the default ./nuget.config file does not exist, the tools and packages commands use a default configuration
with only the official nuget.org source (https://api.nuget.org/v3/index.json). User and machine-wide NuGet
configuration are not consulted; a nuget.config passed explicitly via --config must exist.
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. Literal credentials are not supported.
Before any feed is queried, the nuget.config file is validated and the command exits with code 1 when any of the
following does not hold:
- the configuration declares at least one package source;
- every package source is an HTTPS URL and declares
protocolVersion="3"; - every credential value is a
%ENV_VAR%placeholder, as shown in the example below; - every credential key is
UserNameorClearTextPassword.
Validation errors are also written to the errors array of the report when --output is used; a configuration
without any package sources aborts before a report is written.
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>
Package source mapping
The tools and packages commands honour the packageSourceMapping
section of the nuget.config file. When the section is present, only the package sources mapped to a package or tool id
are queried. This avoids unnecessary calls to private feeds and matches the sources dotnet restore would use.
<packageSourceMapping>
<clear />
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
<packageSource key="robyvandamme">
<package pattern="dotbump" />
<package pattern="dotadr" />
</packageSource>
</packageSourceMapping>
Matching rules:
- Package ids and patterns are matched case-insensitively.
- An exact package id pattern has the highest precedence, then the longest prefix pattern (for example
Microsoft.Extensions.*beforeMicrosoft.*), and*has the lowest precedence. - When several sources declare the winning pattern, all of them are queried and the highest eligible version wins.
- Sources that are not mapped to any package are not queried at all.
If a mapping is configured but a package or tool id does not match any pattern, it is skipped and a warning is added
to the report. Mapping entries that reference a source key that is not declared in packageSources are ignored and
also reported as warnings. If the nuget.config file has no packageSourceMapping section, all configured sources are
queried as before.
Only the nuget.config file passed via --config (by default ./nuget.config) is read. Mappings from parent, user or
machine-wide configuration files are not merged.
Logging
All commands accept --debug and --logfile.
--debug enables debug logging for troubleshooting, which includes response data. It can be passed as a bare
flag; --debug false explicitly disables it. The --debug=true and --debug=false forms are also accepted.
--logfile sends log output to the given file, specified either as --logfile path or --logfile=path. Missing
directories are created automatically.
Logging is configured after the command line has been parsed, so arguments that fail to parse are reported on the
console but are not written to --logfile. Errors raised while a command runs are logged once logging has been
configured.
--logfile is not validated up front. If the log file cannot be created or written — for example because the
directory is not writable, the file is locked, or the disk is full — the command still runs and no log is produced,
without an error. This is a known limitation.
Scanning and file handling
The repository-scanning commands (packages, frameworks and language) scan the directory passed via --path
recursively. Directories named bin, obj, .git, .vs and node_modules are skipped. Additional directories can
be skipped with --exclude (repeatable). 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. Symlinked files and directories are
skipped; only regular files are scanned.
Only files that actually change are written back, and only the affected value is changed; everything else (attribute quoting, entities, attribute layout, XML declaration, encoding, byte order mark and line endings) is preserved.
Reports
All commands accept --output to write a report. The format is inferred from the file extension:
.json— the full, machine-readable report, including every entry, its old and new version, and thewarningsanderrorsarrays. Forpackagesthere is one entry per package id and effective condition, using the highest currently referenced version in that group as the old version; all occurrences in the group are updated together. Conditional entries include aconditionproperty. 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.
All commands return exit code 1 when an error occurs (for example an invalid NuGet configuration).
Invalid arguments — for example a nonexistent --manifest, --config, --path or --exclude path, an empty
--skip-tool/--skip-package value, or an unknown option — are rejected before the command runs and return exit
code -1.
## 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.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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 |
|---|---|---|
| 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 |