CmdLine parsing was extracted from XMake and the implementation is visible to dotnet#12704
Merged
Conversation
The `usingSwitchesFromAutoResponseFile` field has been removed from the `CommandLineParser` class, along with the associated logic that set its value. This includes the removal of the check for `switchesFromAutoResponseFile.HaveAnySwitchesBeenSet()` and the assignment to this field. The `ResetGatheringSwitchesState` method has been updated to no longer reset this field, as it is no longer needed. These changes simplify the class by eliminating redundant state management related to auto-response file switches, improving maintainability.
baronfel
reviewed
Nov 3, 2025
baronfel
approved these changes
Nov 4, 2025
rainersigwald
approved these changes
Nov 10, 2025
rainersigwald
left a comment
Member
There was a problem hiding this comment.
Didn't get to dig in to all the details but this sounds directionally good to me.
JanProvaznik
added a commit
to JanProvaznik/msbuild
that referenced
this pull request
Nov 19, 2025
…on is visible to dotnet (dotnet#12704)" This reverts commit a73379b.
YuliiaKovalova
pushed a commit
that referenced
this pull request
Nov 20, 2025
reverts #12693 #12704 ### Context unblocking VMR insertion dotnet/dotnet#3091 ### Changes Made ### Testing ### Notes
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.
Context
In some cases dotnet needs to process MSBuild cmdline switches including response files.
Changes Made
The parsing logic was pulled out from XMake to isolate it in the internal type, making it easily reusable in the .NET SDK project.
Testing
All existing tests are passing.
Notes
The goal of this PR isn’t to refactor the entire API—that’s something we can consider tackling later on.