Visitar URL original
Remove specialized code for Central Package Management by dougwaldron · Pull Request #697 · dotnet-outdated/dotnet-outdated · GitHub
Skip to content

Remove specialized code for Central Package Management - #697

Merged
slang25 merged 1 commit into
dotnet-outdated:masterfrom
dougwaldron:remove-cpm
Feb 8, 2026
Merged

slang25 merged 1 commit into
dotnet-outdated:masterfrom
dougwaldron:remove-cpm

Conversation

@dougwaldron

Copy link
Copy Markdown
Contributor

See #529 (comment) for background.

Originally, the dotnet CLI did not support projects that used Central Package Management, so specialized code was added to dotnet-outdated to handle CPM. Shortly thereafter, CPM support was added to the dotnet CLI, so this bifurcated code is no longer needed (and causes errors in some cases as discussed above).

This PR removes that obsolete code and is very nearly a simple reversion of commit 2d5967d.

fixes #529

CPM package updates can now be handled using the standard update mechanism. See
#529 (comment)

@slang25 slang25 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, thanks!

@slang25
slang25 merged commit 6f0adc1 into dotnet-outdated:master Feb 8, 2026
6 checks passed
@Frulfump

Frulfump commented Feb 8, 2026

Copy link
Copy Markdown

Nice work, thanks!

Awesome, maybe #536 is also fixed by this?

@slang25

slang25 commented Feb 8, 2026

Copy link
Copy Markdown
Member

@Frulfump it is 🙂 I tested it before merging. I'll close it off once I do a release

slang25 added a commit that referenced this pull request Feb 14, 2026
- Implement Model Context Protocol (MCP) server (#696)
- Make dotnet command timeout configurable (#701)
- Remove specialized code for Central Package Management (#697)
- Fix warning (#667)
timabell pushed a commit to timabell/dotnet-outdated that referenced this pull request Nov 12, 2026
`dotnet add package` can't update a GlobalPackageReference: it adds a
PackageReference to the project, which central package management
rejects ("PackageVersion ... defined in incorrect location"). Since
dotnet-outdated#697 a GlobalPackageReference with a literal version went through it
unless --no-restore was set, so `--upgrade` failed (dotnet-outdated#681).

The version locator now asks the evaluator whether a package's version
comes from a GlobalPackageReference and in which file, and the upgrade
writes that file directly and restores the project once (shared with
the variable path's restore-once logic). This also handles a
GlobalPackageReference declared outside Directory.Packages.props.

Fixes dotnet-outdated#681

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Central Package Management with conditional ItemGroups per target framework

3 participants