upgrade to support .Net 10 and System.CommandLine v2#340
upgrade to support .Net 10 and System.CommandLine v2#340aminparsa18 wants to merge 3 commits intoprom3theu5:mainfrom
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
User description
This PR upgrades the project to .NET 10.0 and migrates to System.CommandLine v2.0, addressing several deprecation warnings and API breaking changes.
Changes Made
Framework & Dependencies
System.CommandLine v2.0 Migration
Command API Changes:
CommandLineBuilderpattern to directCommand.Parse().InvokeAsync()patternBaseOption<T>constructors to follow new API (name is now mandatory, aliases are separate)Nameproperty assignments as it's now read-onlyDependency Injection:
CommandLineBuilder.AddMiddleware()usage (removed in v2.0)Help Context:
UseDefaultMaskingto work with new help system (HelpContext is now internal)Code Cleanup
Rfc2898DeriveBytesconstructor warnings by migrating to staticPbkdf2methodServiceVolumehandling to useSourceproperty instead of string splittingPR Type
Enhancement
Description
Upgrade target framework from .NET 9.0 to .NET 10.0
Migrate System.CommandLine from v2.0-beta to v2.0.2 stable
Refactor command API from CommandLineBuilder pattern to direct Command usage
Update all option constructors to new BaseOption API with mandatory name parameter
Replace deprecated Rfc2898DeriveBytes constructor with static Pbkdf2 method
Update dependency injection middleware from builder pattern to service configuration
Modernize help system integration and volume handling in Docker Compose
Diagram Walkthrough
File Walkthrough
52 files
Migrate to System.CommandLine v2 API patternsRemove obsolete CommandLineBuilder using directiveRefactor DI from builder pattern to service configurationSimplify command invocation with new v2 APIUpdate volume handling to use Source propertyReplace AddOption with Options.Add collectionUpdate command handler and option registration patternsReplace AddOption with Options.Add collectionReplace AddOption with Options.Add collectionReplace AddOption with Options.Add collectionUpdate handler property to Action for v2 APIReplace AddOption with Options.Add collectionReplace AddOption with Options.Add collectionReplace AddCommand with Subcommands.Add collectionRefactor constructor to match System.CommandLine v2 APIUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor and replace AddValidator with Validators.AddUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor and replace AddValidator with Validators.AddUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor and replace AddValidator with Validators.AddUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate constructor signature and remove Name assignmentUpdate collection types for Secrets and Volumes1 files
Replace Rfc2898DeriveBytes constructor with static Pbkdf2 method8 files
Update dotnet version from 9.0 to 10.0Update dotnet version from 9.0 to 10.0Update target framework to net10.0Update target framework to net10.0Update target framework to net10.0Update target framework to net10.0Update target framework to net10.0Update target framework to net10.01 files
Update NuGet package versions for .NET 10 compatibility