- 
                Notifications
    
You must be signed in to change notification settings  - Fork 0
 
Open
Labels
Description
Area
Application Services (API, Functions, etc.)
Motivation
After updating to System.CommandLine 2.0.0-beta5, the main entry point in Program.cs needs to be updated to use the new API patterns. The beta5 version introduces breaking changes that require:
- Replacing 
rootCommand.AddCommand()calls withrootCommand.Subcommands.Add()syntax - Updating the main entry point to handle the new parsing and invocation separation
 - Modernizing the command registration pattern
 
Task Description
Update src/GenAIDBExplorer/GenAIDBExplorer.Console/Program.cs to use the new System.CommandLine 2.0.0-beta5 API patterns for command registration and program entry point.
Specific Changes Required:
- Replace all 
rootCommand.AddCommand()calls withrootCommand.Subcommands.Add()syntax - Update the main entry point to handle the new parsing and invocation separation
 - Ensure the command registration follows the new mutable collections pattern
 - Update any global options registration to use the new pattern
 
Files to Modify:
src/GenAIDBExplorer/GenAIDBExplorer.Console/Program.cs
Acceptance Criteria
-  All command registration uses 
rootCommand.Subcommands.Add()instead ofrootCommand.AddCommand() - Main entry point correctly uses new parsing and invocation pattern
 - Global options (if any) are properly registered using the new API
 - Project compiles without errors related to Program.cs
 -  Application starts and shows help correctly with 
--helpoption - No regression in existing command-line interface behavior
 
Impact / Risk
- Dependencies: Requires completion of issue [Chore]: Update System.CommandLine package reference to 2.0.0-beta5 #15 (package reference update) first
 - Risk Level: Medium - Changes to main entry point could affect all command execution
 - Breaking Changes: Internal only - external CLI interface should remain the same
 - Testing: Requires manual testing of application startup and help display
 
Related Issues:
- Depends on [Chore]: Update System.CommandLine package reference to 2.0.0-beta5 #15 (Update System.CommandLine package reference)
 - Part of the larger System.CommandLine upgrade effort as outlined in plan-upgrade-system-commandline-beta5.md
 
Copilot