Skip to content

Failure updating transitive dependencies with centralized package management #561

Open

Description

@moni-dips

Hello, I ran into an issue with a periodic build that does dotnet outdated -u -t -td 10 and run tests to detect breaking changes.
outdated adds transitive dependency packages to each csproj file, but it adds them with a version attribute, which then fails during dotnet restore.

Adding transitive dependencies when a project is affected by CPM needs to add the package to the Directory.Packages.props in addition to modifying the csproj files.

Activity

  1. slang25 commented on Jun 8, 2024

    @slang25
    Member

    Thanks for the bug report, are you able to share a repo with an minimal example of the issue?

  2. moni-dips commented on Jun 8, 2024

    @moni-dips
    Author

    sure thing, I will see what I can do

  3. moni-dips commented on Jun 10, 2024

    @moni-dips
    Author

    I seem unable to construct the issue in a new empty solution, try as I might.
    It reliably happens in our existing solution using dotnet-outdated-tool 4.6.4 though

    The solution has one xunit project, three .net 8 projects and one dual targetting .net8/net48 project.
    It uses nuget.config source mapping with internal nuget servers only, but different feeds for different packages.

    Is there some kind of debug logging we can do to try and gather additional insight?

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions