dotnet-check-updates 0.2.0

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

icon

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.

example-output

  • 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

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 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. 
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.4.0 68 11/2/2024
0.3.1 69 10/29/2024
0.3.0 337 2/25/2024
0.2.4 175 2/16/2024
0.2.3 226 2/11/2024
0.2.2 361 11/22/2023
0.2.1 195 11/22/2023
0.2.0 182 11/15/2023
0.1.0 151 11/10/2023