Skip to content

Update to centralized package management no longer works after release 4.7.0 #703

Closed

Description

@GabrielSandor-UiPath

The dotnet-outdated tool no longer updates Directory.Packages.props contents when present, but instead modifies each individual csproj file in the solution. This only started after release 4.7.0, possibly caused by #697. I am using the latest .NET SDK.

Is there a way to force it to consider the Directory.Packages.props file instead? It resides near the solution file, where i run the dotnet-outdated command, same as before.

Activity

  1. slang25 commented on Feb 16, 2026

    @slang25
    Member

    Do you have a repro I can look at? Also what version of NuGet or the dotnet SDK do you have?

  2. GabrielSandor-UiPath commented on Feb 16, 2026

    @GabrielSandor-UiPath
    Author

    Do you have a repro I can look at? Also what version of NuGet or the dotnet SDK do you have?

    Sorry, i cannot share the repo. The .NET SDK version is 10.0.200-preview.0.26103.119. I do not have NuGet installed as a separate executable, everything goes through the .NET SDK i assume.

  3. nesc58 commented on Feb 16, 2026

    @nesc58

    I can confirm the issue. Here is a small repo: https://github.com/nesc58/DotnetOutdatedToolIssue703

    Using 4.6.9 works as expected (unless some known issues like multiple framework issues, range support etc.). But running 4.7.0 it creates uncompilable csproj files

    After run the update

    PS DotnetOutdatedToolIssue703> dotnet outdated -n -u
    Discovering projects...
    Analyzing project(s)...
    Analyzing dependencies...
    » DotnetOutdatedToolIssue703
      [net10.0]
      Microsoft.Extensions.Caching.Abstractions  10.0.0 -> 10.0.3
      [net9.0]
      Microsoft.Extensions.Caching.Abstractions  10.0.0 -> 10.0.3
      [net8.0]
      Microsoft.Extensions.Caching.Abstractions  10.0.0 -> 10.0.3
      [.NETStandard,Version=v2.0]
      Microsoft.Extensions.Caching.Abstractions  10.0.0 -> 10.0.3
      [.NETStandard,Version=v2.1]
      Microsoft.Extensions.Caching.Abstractions  10.0.0 -> 10.0.3
    
    Version color legend:
    <red>   : Major version update or pre-release version. Possible breaking changes.
    <yellow>: Minor version update. Backwards-compatible features added.
    <green> : Patch version update. Backwards-compatible bug fixes.
    
    Upgrading package Microsoft.Extensions.Caching.Abstractions...
    Project DotnetOutdatedToolIssue703 [net10.0] upgraded successfully
    Project DotnetOutdatedToolIssue703 [net9.0] upgraded successfully
    Project DotnetOutdatedToolIssue703 [net8.0] upgraded successfully
    Project DotnetOutdatedToolIssue703 [.NETStandard,Version=v2.0] upgraded successfully
    Project DotnetOutdatedToolIssue703 [.NETStandard,Version=v2.1] upgraded successfully
    
    Elapsed: 00:00:08.8581819
    

    The csproj looks like and the directory.packages.props is not updated

    <Project Sdk="Microsoft.NET.Sdk">
    
        <ItemGroup>
          <PackageReference Include="Microsoft.Extensions.Caching.Abstractions">
            <Version>10.0.3</Version>
            <Version>10.0.3</Version>
            <Version>10.0.3</Version>
            <Version>10.0.3</Version>
            <Version>10.0.3</Version>
          </PackageReference>
        </ItemGroup>
    
    </Project>
    
  4. aomader commented on Feb 16, 2026

    @aomader
    Contributor

    Running into the same issue.

  5. MrRickwi commented on Feb 16, 2026

    @MrRickwi

    Same here. What I discovered:

    • dotnet outdated -u works, but is as slow as updating all projects one by one. It was MUCH faster with Directory.Packages.props before
    • dotnet outdated -u --no-restore does not work, it updates every csproj file with a version tag added

    The previous solution was really nice, mainly because it was stable and it was fast. Please make it stable and fast again.

  6. dougwaldron commented on Feb 16, 2026

    @dougwaldron
    Contributor

    I'm seeing the same as @MrRickwi, but the issue seems to be in the dotnet CLI, not the dotnet-outdated tool.

    If I clone the test repo from @nesc58, I can replicate the issue without using dotnet-outdated by running the following commands from the project directory.

    This command successfully updates the package:

    dotnet add package Microsoft.Extensions.Caching.Abstractions -v 10.0.3
    

    This command fails and messes up the csproj file in the way described above:

    dotnet add package Microsoft.Extensions.Caching.Abstractions -v 10.0.3 --no-restore
    
  7. slang25 commented on Feb 17, 2026

    @slang25
    Member

    Thanks @dougwaldron, you are exactly right.

    With restore ✅

    dotnet outdated -u
     <Project>
    -    <PropertyGroup>
    -        <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
    -    </PropertyGroup>
    -    <ItemGroup>
    -        <PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.0"/>
    -    </ItemGroup>
    +  <PropertyGroup>
    +    <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
    +  </PropertyGroup>
    +  <ItemGroup>
    +    <PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.3" />
    +  </ItemGroup>
     </Project>

    With no restore ❌

    dotnet outdated -u -n
     <Project Sdk="Microsoft.NET.Sdk">
    
         <ItemGroup>
    -      <PackageReference Include="Microsoft.Extensions.Caching.Abstractions" />
    +      <PackageReference Include="Microsoft.Extensions.Caching.Abstractions">
    +        <Version>10.0.3</Version>
    +        <Version>10.0.3</Version>
    +        <Version>10.0.3</Version>
    +        <Version>10.0.3</Version>
    +        <Version>10.0.3</Version>
    +      </PackageReference>
         </ItemGroup>
    
     </Project>

    The problem is that our hand rolled solution before had issues, so simply rolling it back would regress other issues.

    I'll do some more digging to see if there's anything we can do to workaround the issue, and consider a way forward.

  8. nesc58 commented on Feb 19, 2026

    @nesc58

    Is a bugfix release for this issue planned?

  9. Miner28 commented on Feb 25, 2026

    @Miner28

    Can we have a bug-fix release soon please ?

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