V0.10.0/dotnet nuget update - #40
Conversation
Introduce complete NuGet dependency audit and update workflow with support for central package management and project-level versioning. Handles TFM-aware updates, stable/prerelease intent tracking, major version approval batching, and offline-testable scenarios. Includes bundled scripts for audit, comparison, and structured file edits.
Add dotnet-nuget-update to the Available Skills catalog table with full skill description, include the npx installation command in the setup section, and add a 'Why dotnet-nuget-update?' community health section explaining the need for complete dependency graph auditing, TFM-band awareness, and preservation of intentional pins and compatibility markers.
Greptile SummaryThis PR introduces the
Confidence Score: 4/5The PR is not yet safe to merge because target-framework discovery can still resolve one project’s property-based TFM using properties collected from another project. The outstanding previous finding in Files Needing Attention: skills/dotnet-nuget-update/scripts/Get-TargetFrameworks.ps1 Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Enumerate package declarations] --> B[Complete dependency audit]
B --> C[Resolve compatible versions]
C --> D{Update class}
D -->|Current| E[Report unchanged]
D -->|Patch, minor, revision, prerelease| F[Apply targeted XML edit]
D -->|Major| G[Approve or hold]
D -->|Unresolved| H[Report manual follow-up]
F --> I[Re-audit and validate]
G --> I
Reviews (4): Last reviewed commit: "🐛 fix xml entity decoding in condition ..." | Re-trigger Greptile |
Enhance file encoding detection to support UTF-32 and UTF-16 variants. Improve line-ending preservation with better handling of mixed styles. Refactor XML and NuGet version parsing with more sophisticated patterns and error handling. Strengthen cross-line tag parsing and version validation for edge cases in package updates and audit workflows.
| $propertyMap = @{} | ||
| foreach ($propsFile in @($propsFiles | Sort-Object { $_.FullName.Length })) { | ||
| foreach ($entry in (Get-PropertyMap -Path $propsFile.FullName).GetEnumerator()) { | ||
| $propertyMap[$entry.Key] = $entry.Value | ||
| } | ||
| } | ||
| if (Test-Path -LiteralPath $directoryBuildProps) { | ||
| foreach ($entry in (Get-PropertyMap -Path $directoryBuildProps).GetEnumerator()) { | ||
| $propertyMap[$entry.Key] = $entry.Value | ||
| } | ||
| } |
There was a problem hiding this comment.
Project Properties Leak Globally
In a multi-project repository with conflicting nested properties, this code merges properties from every .props and .targets file into one global map and applies it to every project, regardless of the project's actual imports. A property-based TFM can therefore resolve using another project's value, causing validation to omit the real framework or test the wrong one.
Prompt To Fix With AI
This is a comment left during a code review.
Path: skills/dotnet-nuget-update/scripts/Get-TargetFrameworks.ps1
Line: 135-145
Comment:
**Project Properties Leak Globally**
In a multi-project repository with conflicting nested properties, this code merges properties from every `.props` and `.targets` file into one global map and applies it to every project, regardless of the project's actual imports. A property-based TFM can therefore resolve using another project's value, causing validation to omit the real framework or test the wrong one.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Improve central vs project package declaration routing to correctly handle updates targeting project files. Enhance conflict reporting to enumerate all conflicting sources when unspecified. Fix property resolution precedence to preserve first-matched declarations instead of overwriting with later files.
This pull request introduces the new
dotnet-nuget-updateskill, a deterministic tool for auditing and updating NuGet dependencies in .NET repositories. It ensures every declared package version is accounted for before any update, supports both central and project-level package management, preserves compatibility markers, and offers both interactive and automated update modes. The update also adds comprehensive documentation, test coverage, and offline-testable scripts.New skill:
dotnet-nuget-updatedotnet-nuget-updateskill for complete NuGet dependency auditing and updating, supporting central and project-level versioning, TFM-band awareness, stable/prerelease intent inference, and two interactive modes (normal and yolo). [1] [2]README.mdwith catalog entry, installation instructions, and a detailed "Why dotnet-nuget-update?" section explaining its approach to dependency management. [1] [2] [3]Release and documentation updates
0.10.0release entry inCHANGELOG.mddescribing the new skill and its features.