Skip to content

Add --deprecated option to dotnet package update #14871

@zivkan

Description

@zivkan

NuGet Product(s) Involved

dotnet.exe

The Elevator Pitch

NuGet.org allows package owners to mark packages as deprecated, for example some versions of the package that are no longer supported.

dotnet package update should have a --deprecated option that upgrades these packages, similar to how --vulnerable works.

It would be nice if it's possible to use --deprecated and --vulnerable in the same command. dotnet package update can choose the preferred version to fix vulnerably and deprecation separately, and then choose the higher of the two.

Additional Context and Details

If all versions of a package are marked as deprecated, then dotnet package update --deprecated will be unable to upgrade the package, as it's a simple tool.

Additionally, the first version won't make any attempt to change the package name when the deprecation message recommends changing to a different package. AI tooling is better suited to automatically fixing build and test errors if the new package has different APIs or behaviors than the old package. So, switching to the recommended package is out of scope for the first version of dotnet package update --deprecated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions