Implement comprehensive OutdatedService with MSBuild integration and NuGet API support#3
Implement comprehensive OutdatedService with MSBuild integration and NuGet API support#3
Conversation
…rgetFrameworks prompting Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com>
Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com>
|
@copilot The workflow For updating TargetFramework or TargetFrameworks is still wrong The to value is the major version of the current sdk installed If a projectfile contains both TargetFramework and TargetFrameworks, emit a warning and treat the value from TargetFramework as from. But run the logic from C) i think either tfm |
Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com>
Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com>
I've implemented the complete TFM migration logic according to your requirements in commit 3a87bae. Key changes made: A) TargetFramework handling:
B) TargetFramework + TargetFrameworks:
C) TargetFrameworks logic:
Examples: The implementation correctly handles all the scenarios you described and provides clear user feedback about what will be changed. |
|
@copilot whenever you extract any information from a csproj project file, for example the TargetFramework, you must use a mechanism like in ProjParser.LoadProject with the propertyName. reason is project files can contain variables like $(NetVersion) which must be evaluated. This applies to any property parsed from project files EXCEPT for <ProjectReferences where you can just parse the xml. |
…nullable Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com>
I've implemented the requested changes to use ProjParser.LoadProject for extracting project properties instead of direct XML parsing in commit 3560314. Key changes made:
Variable handling verification:
The implementation now properly evaluates all MSBuild variables and properties when extracting TargetFramework information from csproj files. |
…ng specificity-based precedence, whitelist override, and proper pre-release version handling (#4) * Initial plan * Implement core NuGet package analysis command with categorization Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com> * Complete NuGet download counts feature with network fallback and re-categorization Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com> * Implement whitelist/blacklist functionality and remove download counts Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com> * Fix whitelist color and panel border issues in nuget command Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com> * Add microsoft and trusted sections to whitelist/blacklist file for custom categorization Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com> * Add version specification support to whitelist/blacklist filtering Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com> * Implement enhanced whitelist/blacklist filtering with specificity and precedence rules Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com>
was terrible bz coding agent and is a mess now
|
@copilot Please check OutdatedService and ProjParser and ProjectPackageReferenceInfo
|
Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com>
…d structured approach Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com>
I've implemented the requested OutdatedService improvements in commit d0d105e. Key changes made:
The implementation now properly queries all package references across projects, gets latest versions from NuGet API with target framework compatibility, and applies updates using the MSBuild evaluation API as requested. |
This PR implements a complete rewrite of the OutdatedService to provide robust package outdated checking and updating functionality with proper MSBuild integration as requested.
Key Features Implemented
MSBuild-Based Package Analysis: The service now uses
ProjParser.LoadProjectwith MSBuild evaluation to extract all package references and versions from projects, ensuring proper variable evaluation and project property resolution.Aggregated Package View: Creates a comprehensive summary of all packages across projects showing:
NuGet API Integration: Implements direct integration with NuGet's registration API to query latest compatible versions for each package based on target framework compatibility.
Microsoft.Build.Evaluation API Updates: Package updates are applied using the MSBuild evaluation API in
ProjParser.SetPackageReferences, which:Dual Update Support: Handles both update scenarios:
PackageReferenceelements in.csprojfiles using MSBuild APIPackageVersionelements inDirectory.Packages.propsfilesUsage
Example Output
The implementation provides a solid foundation for package management operations with proper error handling, detailed logging, and support for both individual projects and solution-wide operations.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.