Check for newer versions of installed NuGet Packages in your Terminal.
PackCheck is a dotnet tool for checking versions of installed NuGet packages in your .NET projects in your terminal.
The check command (default) shows you all NuGet packages in a nice table with the current, latest stable and latest versions of each package.
You can upgrade the .csproj (or Directory.Packages.props if you use Central Package Management) file with the upgrade command to your desired target versions. Whether to the latest stable or latest version, only a specific
package or all at once.
You can install PackCheck as a dotnet tool via NuGet:
# Install
dotnet tool install --global PackCheck
# Update
dotnet tool update --global PackCheckIn your terminal cd into a .NET project or .NET solution and run:
packcheck
# or
packcheck c
# or
packcheck checkThis should give you something like this:
If you also want to see the latest version, which includes prereleases, use the --pre flag:
packcheck --preThis should give you something like this:
To check versions of a file-based app you need to provide the path to the file:
packcheck --fbaFile app.csAfter that you can upgrade the package versions in the .csproj file (or .csproj files in a solution, the Directory.Packages.props file or the given file-based app file) to their corresponding stable versions by running:
This changes your .csproj file(s) or the Directory.Packages.props or the provided file-based app file!
packcheck upgrade
# or
packcheck u
# For file-based app you need to provide the path to the file
packcheck u --fbaFile app.csTo upgrade to the latest versions run:
packcheck upgrade --target latest
# or
packcheck u --target latestFor a dry-run, which outputs the .csproj file (or the Directory.Packages.props, or the changes of a file-based app file) into the terminal without actually changing the file, run:
packcheck upgrade --dry-run
# or
packcheck u --dry-runTo use interactive mode, where you can select each package you want to upgrade, run:
packcheck upgrade -i
# or
packcheck u -i
# or to upgrade to the latest versions
packcheck u --target latest -iTo select packages which should be checked or upgraded, run:
packcheck --filter "NuGet.Version" -f "Microsoft.Logging"To exclude packages which should not be checked or upgraded, run:
packcheck --exclude "NuGet.Version" -x "Microsoft.Logging"To format the output of the check command, use the --format option. Currently only group is supported, which groups the packages by patch, minor and major versions.
packcheck --format groupTo show the latest versions in the output of the check command, use the --pre option, otherwise only the current and latest stable columns will be shown.
packcheck --preYou can configure PackCheck via a .packcheckrc.{json} file. Example:
{
"CsProjFile": "path/to/Project.csproj",
"SlnFile": "path/to/Project.sln",
"SlnxFile": "path/to/Project.slnx",
"CpmFile": "path/to/Directory.Packages.props",
"FbaFile": "path/to/file-based-app.cs",
"Filter": ["NuGet.Version"],
"Exclude": ["Microsoft.Logging"],
"Format": "group",
"Pre": true
}For help run:
packcheck -h| Color | Description |
|---|---|
| red | Major (Breaking changes) |
| yellow | Minor (New features, but backwards compatible) |
| green | Patch (Backwards compatible bug fixes only) |
MIT

