Accept uppercase MSBUILDDEBUGENGINE on Unix - #14708
Accept uppercase MSBUILDDEBUGENGINE on Unix#14708rainersigwald with Copilot wants to merge 4 commits into
Conversation
|
Hello @copilot, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo. |
Co-authored-by: rainersigwald <3347530+rainersigwald@users.noreply.github.com>
| { | ||
| public class DebugUtils_Tests | ||
| { | ||
| [UnixOnlyFact] |
There was a problem hiding this comment.
@copilot does this need to be unix-specific? Shouldn't it apply everywhere because Windows treats env vars as case-insensitive?
There was a problem hiding this comment.
Yes. On Windows the existing mixed-case lookup resolves the uppercase name because environment-variable names are case-insensitive. I changed the test to [Fact] so it runs everywhere in 6507212.
Co-authored-by: rainersigwald <3347530+rainersigwald@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates MSBuild’s Traits.DebugEngine toggle to recognize an all-uppercase environment variable name on Unix-like systems, addressing CI environments (like Azure DevOps) that uppercase variable names while Unix environment-variable names remain case-sensitive.
Changes:
- Allow
MSBUILDDEBUGENGINEto enable the debug engine on non-Windows platforms, while preserving existingMSBuildDebugEnginebehavior. - Add a unit test intended to validate the uppercase-only configuration path.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Framework/Traits.cs | Adds a non-Windows fallback check for MSBUILDDEBUGENGINE to enable debug engine. |
| src/Build.UnitTests/BackEnd/DebugUtils_tests.cs | Adds test coverage for enabling debug engine via an uppercase environment variable. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Context
Azure DevOps uppercases pipeline variables, but Unix environment-variable names are case-sensitive. MSBuild therefore ignored
MSBUILDDEBUGENGINE, requiring per-step casing overrides.Changes Made
MSBUILDDEBUGENGINEas a Unix fallback.MSBuildDebugEngine.Testing
Notes
The fallback is skipped on Windows to avoid a redundant environment lookup.