dotnet-check-updates
0.2.3
See the version list below for details.
dotnet tool install --global dotnet-check-updates --version 0.2.3
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local dotnet-check-updates --version 0.2.3
#tool dotnet:?package=dotnet-check-updates&version=0.2.3
nuke :add-package dotnet-check-updates --version 0.2.3
dotnet-check-updates
dotnet-check-updates
is a command-line tool for .NET that helps developers to check for possible upgrades of NuGet packages in their C# projects.
Inspired by npm-check-updates, this tool aims to streamline the process of keeping your .NET projects up-to-date with the latest package versions.
- Red = major version upgrade
- Cyan = minor version upgrade
- Green = patch version upgrade
Installation
To install dotnet-check-updates
, you can use the following command:
dotnet tool install --global dotnet-check-updates
Features
- Support for C# projects (.csproj files) with PackageReferences
- Support for solutions (.sln files) for discovering projects
- Recursive search for project files with customizable depth
- Option to restore packages after an upgrade
- Listing of existing packages with their current versions
- Support for pre-release versions by specifying upgrade target
- Maintains existing version range notation, i.e.
Current | Upgraded |
---|---|
<PackageReference Include="semver" Version="2.0.6" /> |
<PackageReference Include="semver" Version="2.3.0" /> |
<PackageReference Include="semver" Version="[2.0.6,)" /> |
<PackageReference Include="semver" Version="[2.3.0,)" /> |
<PackageReference Include="semver" Version="[2.0.6]" /> |
<PackageReference Include="semver" Version="[2.3.0]" /> |
Limitations
- Currently only supports upgrading packages using PackageReferences in project files
- Only certain Version ranges are supported when checking for upgrades (pre-releases are supported for these ranges):
Notation | Description |
---|---|
1.0 |
Minimum version, inclusive |
[1.0,) |
Minimum version, inclusive |
[1.0] |
Exact version match |
Project disovery
By default, dotnet-check-updates will search the current directory for C# project (.csproj) files. If no project files are found, it will then search for solution (.sln) files in the current directory.
Usage
To use dotnet-check-updates, run the following command in your terminal:
dotnet-check-updates [OPTIONS]
NOTE: Alternatively when using the global tool you may also invoke:
dotnet check-updates [OPTIONS]
See Invoke a global tool for more information.
Options
To list all available options run:
dotnet-check-updates --help
Examples
Check for the latest versions for all dependencies in discovered projects:
dotnet-check-updates
List existing packages and their versions while also searching for upgrades:
dotnet-check-updates --list
Include filters:
# Include only packages which contain the word system (case-insensitive) in their package name
dotnet-check-updates --include 'System'
# or
dotnet-check-updates --include '*System*'
# Include only packages which start with the word System
dotnet-check-updates --include 'System*'
Exclude filters:
# Exclude packages which contain the word system (case-insensitive) in their package name
dotnet-check-updates --exclude 'System'
# or
dotnet-check-updates --exclude '*System*'
# Exclude packages which start with the word System
dotnet-check-updates --exclude 'System*'
Upgrade packages in the found projects to the latest version:
dotnet-check-updates --upgrade
Make sure your projects are in version control and all changes have been committed. This will overwrite your project files.
Search for projects in a specific solution file, upgrade packages and restore them:
dotnet-check-updates --solution path/to/your/solution.sln --upgrade --restore
Make sure your projects are in version control and all changes have been committed. This will overwrite your project files.
License
dotnet-check-updates is licensed under the MIT License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
This package has no dependencies.
• Implement support for Directory.Build.props files
• Implement -i|--include and -e|--exclude for filtering specific packages to include or exclude
Full changelog at https://github.com/vipentti/dotnet-check-updates/blob/main/CHANGELOG.md