-
Notifications
You must be signed in to change notification settings - Fork 252
Show outdated packages
- Status: Reviewed
- Author(s): Anand Gaurav (@adgrv)
Some functionalities of
dotnet outdated
have been incorporated intodotnet list
. Spec: https://github.com/NuGet/Home/wiki/dotnet-list-package
NuGet outdated, check or equivalent functionality #5762
- Currently the VS PM UI shows the packages for which updates are available, a similar functionality with the CLI is much needed. This should work with all package format types including PackageReference (v4), project.json(v2) and packages.config (v1).
- Unlisted/Vulnerable/Obsolete packages should be flagged both in the PM UI and using CLI commands. See issue: Deprecate obsolete, vulnerable or legacy packages #2867
We should have an outdated
command that can tell users the outdated packages.
Running in the project folder - Shows only packages that need updates, by default
> dotnet nuget outdated <optional project name or project file>
3 packages need your attention - 2 outdated, 1 deprecated.
Package Current Wanted Latest
EntityFramework 6.1.2 6.1.2 6.2.0
NUnit 2.4.0 2.6.4 3.8.1
My.Sample.Pkg 2.1.3 (D) 4.1.0 4.1.0
(D): Deprecated package(s). Use '--show-deprecated' option for more info.
The outdated
command should have multiple options built into it as summarized in the table below:
outdated command option |
Behavior |
---|---|
--include-prerelease |
Includes prerelelease versions in the results |
--show-deprecated |
Shows deprecated packages details |
--show-latest-patch |
Shows updates available up to latest patch versions |
--all |
Shows all packages irrespective of whether updates are available or not |
--include-transitive |
Includes transitive packages too in the result |
Examples:
Show pre-release package updates
> dotnet nuget outdated --include-prerelease
3 packages need your attention - 2 outdated, 1 deprecated.
Package Current Wanted Latest
EntityFramework 6.1.2 6.1.2 7.0.0-beta4
NUnit 2.4.0 2.6.4 3.8.1
My.Sample.Pkg 2.1.3 (D) 4.1.0 4.1.0
(D): Deprecated package(s). Use '--show-deprecated' option for more info.
Show package updates up to latest patch versions
> dotnet nuget outdated --show-latest-patch
3 packages need your attention - 2 outdated, 1 deprecated.
Package Current Wanted Latest Patch
EntityFramework 6.1.2 6.1.2 6.1.8
NUnit 2.4.0 2.6.4 2.4.1
My.Sample.Pkg 2.1.3 (D) 4.1.0 2.1.6
(D): Deprecated package(s). Use '--show-deprecated' option for more info.
Show all packages in the project
> dotnet nuget outdated --all
Total 4 packages.
3 packages need your attention - 2 outdated, 1 deprecated.
Package Current Wanted Latest
Newtonsoft.Json 11.0.2 11.0.2 11.0.2
EntityFramework 6.1.2 6.1.2 7.0.0-beta4
NUnit 2.4.0 2.6.4 3.8.1
My.Sample.Pkg 2.1.3 (D) 4.1.0 4.1.0
(D): Deprecated package(s). Use '--show-deprecated' option for more info.
Show deprecated packages in the project
> dotnet nuget outdated --show-deprecated
Found 3 deprecated packages.
Package Current Fixed in Latest Deprecation reason
My.Sample.Pkg 2.1.3 2.2.0 4.1.0 Vulnerable (CVE#<CVE#>): <Author's comment>
Demo.Utilities 1.1.0 - - Legacy: Please use My.Demo.Utilities package instead.
Sample.Functions 0.1.0-beta2 1.0.0 2.1.0 Deprecated: Newer stable version available.
Show outdated packages in the solution
> dotnet nuget outdated
<Project name>
<List of outdated packages>
<Project name>
<List of outdated packages>
<Project name>
<List of outdated packages>
(D): Deprecated package(s). Use '--show-deprecated' option for more info.
Total 54 outdated need your attention - 47 outdated, 7 deprecated.
Check out the proposals in the accepted
& proposed
folders on the repository, and active PRs for proposals being discussed today.