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
I'm looking to convert over from NuKeeper to using dotnet-outdated, but have a missing requirement.
Nukeeper had the functionality that if a Directory.Build.props file existed and provided a package version, it would correctly update that package version in that file.
The current version of dotnet-outdated seems to instead just fail with An error occurred while upgrading MyProject instead.
An example Directory.Build.props file like we might use at the root of our repository.
Reacted by Philip Borgström, prettyv, Chris Ormerod, Justus Greiber, Sunny Milenov, Michel Tol, Kurai András, Andrii Siriak, Renato Golia, FXZFun and 6 more
props support has been in it for a while now, however...
it has some issues with the regex...
and the specific requirement requested:
"if a Directory.Build.props file existed"...
"and provided a package version"
the second point is still throwing an error in master.
I have a branch in progress that swaps the regex for a full xml editor that should fix this properly and reduce further problems. PR incoming with a bit of luck
The underlying error from dotnet add is now clearer in this scenario now that c3fbf21 is in master. Showing the error from the call to dotnet add of "Cannot edit items in imported files".
Activity
sloncho commentedon Aug 4, 2022
That would be very useful
Krudonix commentedon Jan 23, 2023
Please implement this ;)
CoenraadS commentedon Feb 9, 2023
You can try using Central Package Management instead https://devblogs.microsoft.com/nuget/introducing-central-package-management/
It should play nicely with dotnet commands.
timabell commentedon Nov 12, 2026
this can probably be closed,props support has been in it for a while now, however...
it has some issues with the regex...
and the specific requirement requested:
Directory.Build.propsfile existed"...the second point is still throwing an error in
master.I have a branch in progress that swaps the regex for a full xml editor that should fix this properly and reduce further problems. PR incoming with a bit of luck
The underlying error from
dotnet addis now clearer in this scenario now that c3fbf21 is inmaster. Showing the error from the call todotnet addof"Cannot edit items in imported files".This error string comes from:
Some related issues in this area for more context. It seems that dotnet add probably should in theory be able to make these changes.
dotnet add packagedoes not work withDirectory.Package.propsNuGet/Home#14317dotnet list packagefails whenDirectory.Packages.propsimports a parent file on .NET 8 NuGet/Home#13218I see that NuKeepr is archived in favour of dependabot + dotnet-outdated, hence needing this support
Upgrade packages whose version lives in a file dotnet cannot edit
Use xml editor for CPM props file editing to fix regex parse issues
Upgrade packages pinned in Directory.Build.props
Use xml editor for CPM props file editing to fix regex parse issues
Add test showing packages pinned in Directory.Build.props can't be up…
Fix: Upgrade packages pinned in a target project's Directory.Build.pr…
Use xml editor for CPM props file editing to fix regex parse issues
Add test showing packages pinned in Directory.Build.props can't be up…
Fix: Upgrade packages pinned in a target project's Directory.Build.pr…
Use xml editor for CPM props file editing to fix regex parse issues