Fix CryptoBase.SpeedTest compilation after System.CommandLine v2 upgrade#87
Closed
Copilot wants to merge 2 commits intorenovate/system.commandline-2.xfrom
Closed
Conversation
Co-authored-by: HMBSbige <19153265+HMBSbige@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix compilation error after package upgrade for CryptoBase.SpeedTest
Fix CryptoBase.SpeedTest compilation after System.CommandLine v2 upgrade
Oct 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After upgrading the
System.CommandLinepackage to version2.0.0-rc.1.25451.107, the CryptoBase.SpeedTest project failed to compile with 9 errors. The v2 API introduced several breaking changes that required updates to the command-line argument and option configuration code.Changes
Updated
Program.csto use the new System.CommandLine v2 API:1. Argument and Option Constructors
Before:
After:
2. Completions
Before:
After:
3. Command Configuration
Before:
After:
4. Action Handler and Invocation
Before:
After:
Verification
dotnet run -- aes-128-ctr --seconds 1dotnet run -- aes-128-ctr,rc4 --seconds 1dotnet run -- all --seconds 1--seconds,--bytes,-s,-bThe changes maintain full backward compatibility with the existing command-line interface while adapting to the new System.CommandLine v2 API.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.