Skip to content

dotnet package update fails with NU1109 when CPM transitive pinning is enabled #15109

Open

Description

@jdvor

NuGet Product Used

dotnet.exe

Product Version

SDK 10.0.300

Worked before?

No - the command was introduced in .NET 10

Impact

It's more difficult to complete my work

Repro Steps & Context

dotnet package update fails with a false NU1109 downgrade error in a Central Package Management solution with CentralPackageTransitivePinningEnabled=true, when a project gets the updated package only transitively through a ProjectReference. The preview restore fails and the command exits with code 3 without changing any file. Bumping the version in Directory.Packages.props by hand and running dotnet restore succeeds.

Minimal repro: https://github.com/jdvor/package-update-cpm (the readme has the full analysis)

  • Lib references Microsoft.Extensions.Logging.Abstractions (central version 10.0.0)
  • App references only Lib
  • transitive pinning is enabled
dotnet restore PackageUpdateCpm.slnx
dotnet package update --project PackageUpdateCpm.slnx
error: NU1109: Detected package downgrade: Microsoft.Extensions.Logging.Abstractions from 10.0.13 to centrally defined 10.0.0. Update the centrally managed package version to a higher version.
error:  App -> Lib -> Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
error:  App -> Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
Preview restore with updated packages was not successful. Force mode is not yet available.

It succeeds when pinning is off or when App references the package directly. Turning pinning off is not a real fix: it is the CPM way to raise vulnerable transitive packages, which NuGet's auditing docs recommend. In our 45-project solution every update fails this way (649 NU1109 errors).

Probable cause: PackageUpdateCommandRunner.GetUpdatedDependencyGraphSpec builds the preview graph by updating only the projects that reference the package directly. Other projects importing the same Directory.Packages.props keep their old central package versions, and transitive pinning then pins the package to the stale version. The preview should update the central versions of every project that shares the file.

Related: #13793 (same false NU1109 with CPM and transitive pinning in the VS package manager UI).

Verbose Logs

❯ dotnet package update --project PackageUpdateCpm.slnx -v detailed
trace: Loading Project(s).
Updating outdated packages in /Users/jand/dev/jdvor/package-update-cpm/PackageUpdateCpm.slnx.
trace: Finding versions of packages to update.
trace: Running restore with 12 concurrent jobs.
trace: Reading project file /Users/jand/dev/jdvor/package-update-cpm/src/Lib/Lib.csproj.
trace: Reading project file /Users/jand/dev/jdvor/package-update-cpm/src/App/App.csproj.
trace: The restore inputs for 'Lib' have changed. Continuing restore.
trace: The restore inputs for 'App' have changed. Continuing restore.
trace: Restoring packages for /Users/jand/dev/jdvor/package-update-cpm/src/Lib/Lib.csproj...
trace: Restoring packages for /Users/jand/dev/jdvor/package-update-cpm/src/App/App.csproj...
trace:   GET https://api.nuget.org/v3/vulnerabilities/index.json
trace:   OK https://api.nuget.org/v3/vulnerabilities/index.json 125ms
trace:   GET https://api.nuget.org/v3-vulnerabilities/2026.10.15.05.26.01/vulnerability.base.json
trace:   GET https://api.nuget.org/v3-vulnerabilities/2026.10.15.05.26.01/2026.10.15.05.26.01/vulnerability.update.json
trace:   OK https://api.nuget.org/v3-vulnerabilities/2026.10.15.05.26.01/vulnerability.base.json 26ms
trace:   OK https://api.nuget.org/v3-vulnerabilities/2026.10.15.05.26.01/2026.10.15.05.26.01/vulnerability.update.json 69ms
trace: All packages and projects are compatible with net10.0.
error: NU1109: Detected package downgrade: Microsoft.Extensions.Logging.Abstractions from 10.0.13 to centrally defined 10.0.0. Update the centrally managed package version to a higher version.
error:  App -> Lib -> Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
error:  App -> Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
trace: All packages and projects are compatible with net10.0.
Preview restore with updated packages was not successful. Force mode is not yet available.

Activity

  1. added
    Functionality:Update
    Area:RestoreCPM
    and removed on Oct 16, 2026
  2. added
    Priority:2
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area:RestoreCPMArea:RestoreCPMTransitiveDependenciesFunctionality:UpdatePriority:2Product:dotnet.exeType:Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions