dotnet-check-updates 0.4.1

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.4.1                
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.4.1                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dotnet-check-updates&version=0.4.1                
nuke :add-package dotnet-check-updates --version 0.4.1                

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

  • Supports upgrading packages using PackageReferences in project and Directory.Build.props files
  • Supports upgrading packages using PackageVersion in Directory.Packages.props 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 --filter 'System'
# or
dotnet-check-updates --filter '*System*'

# Include only packages which start with the word System
dotnet-check-updates --filter '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 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 was computed.  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.2 113 11/20/2024
0.4.1 92 11/20/2024
0.4.0 104 11/2/2024
0.3.1 84 10/29/2024
0.3.0 345 2/25/2024
0.2.4 182 2/16/2024
0.2.3 244 2/11/2024
0.2.2 368 11/22/2023
0.2.1 202 11/22/2023
0.2.0 189 11/15/2023
0.1.0 158 11/10/2023

### Added
• New -t|--target values non-major and pre-non-major

Full changelog at https://github.com/vipentti/dotnet-check-updates/blob/main/CHANGELOG.md