sdk
sdk copied to clipboard
Parser for actual msbuild property syntax
Closes https://github.com/dotnet/sdk/issues/27059
The SDK property option didn't know about the semicolon- and comma-delimited forms of MSBuild properties. This adds an actual parser to validate this shaping, so that we can intelligently do the semi-colon escaping that we aimed to do originally, without also inadvertently escaping the semicolon-delimited property list use case for -p
.
The core tension here is the SDK wants to do escaping of semicolons inside property values so that those properties aren't interpreted incorrectly by the MSBuild CLI parser. This is a historical pain point for users, which is why we started doing this back in the day. This has been done through the Property Option in the SDK, and over time our parsing of the value portions of this CLI flag has grown.
The new tests for this forwarding now cover a few additional cases that I verified with Rainer and Ben - quoted property values that contain semicolons and spaces, and unquoted values signaling a new property name.
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.