You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Directory.Packages.props with more complex PackageReference does not execute regex replace #602
When using (global) Central Package Management via Directory.Packages.props and the <GlobalPackageReference line in question is not a simple single line with self-closing tag /> (such as when specifying controlling assets use-case) the dotnet outdated -u command does correctly recognize the nugets to update, and runs through the process to completion, however does not actually update the Directory.Packages.props file contents.
Without digging to much into this codebase, I am assuming the issue is with Regex here perhaps
Edit: after playing around with the regex, seems a potentially temporary workaround is to put everything on the same line and mark end of line with comment of closing tag it is looking for, such as:
I have kind of the same problem.
the tool says it has updated a library to latest version but no file have changed when using central package when there is a sourcegenerator lib that adds
all runtime; build; native; contentfiles; analyzers; buildtransitive
in the central file. If I remove this and run the tool it works. But if I update the libs in Rider or VS .Net it adds the line again and the update tool will not update the library even if it tells it does.
I have a fork that switched some of the code from regex to xdocument, feel free to give it a try, it might help - master...timabell:dotnet-outdated:main - it's a bit vibe-coded at the moment so not ready for a pr
Activity
jnormen commentedon Mar 11, 2025
I have kind of the same problem.
the tool says it has updated a library to latest version but no file have changed when using central package when there is a sourcegenerator lib that adds
all runtime; build; native; contentfiles; analyzers; buildtransitive
in the central file. If I remove this and run the tool it works. But if I update the libs in Rider or VS .Net it adds the line again and the update tool will not update the library even if it tells it does.
timabell commentedon Sep 18, 2026
I have a fork that switched some of the code from regex to xdocument, feel free to give it a try, it might help - master...timabell:dotnet-outdated:main - it's a bit vibe-coded at the moment so not ready for a pr
Test child-element PackageVersion/GlobalPackageReference updates
Fix multiline central package version updates (#783)
timabell commentedon Nov 12, 2026
looks like this issue can be closed now with #783 merged
Use xml editor for CPM props file editing to fix regex parse issues
Use xml editor for CPM props file editing to fix regex parse issues
Use xml editor for CPM props file editing to fix regex parse issues
Use xml editor for CPM props file editing to fix regex parse issues