Skip to content

Accept uppercase MSBUILDDEBUGENGINE on Unix - #14708

Open
rainersigwald with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-msbuilddebugengine-env-var-casing
Open

Accept uppercase MSBUILDDEBUGENGINE on Unix#14708
rainersigwald with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-msbuilddebugengine-env-var-casing

Conversation

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

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

  • Accept MSBUILDDEBUGENGINE as a Unix fallback.
  • Preserve support for MSBuildDebugEngine.
variables:
  MSBUILDDEBUGENGINE: 1

Testing

  • Added Unix-only coverage for uppercase-only configuration.

Notes

The fallback is skipped on Windows to avoid a redundant environment lookup.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot does this need to be unix-specific? Shouldn't it apply everywhere because Windows treats env vars as case-insensitive?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI changed the title [WIP] Fix MSBuildDebugEngine environment variable casing for Unix Accept uppercase MSBUILDDEBUGENGINE on Unix Aug 14, 2026
Copilot AI requested a review from rainersigwald August 14, 2026 19:35
Co-authored-by: rainersigwald <3347530+rainersigwald@users.noreply.github.com>
@rainersigwald
rainersigwald marked this pull request as ready for review August 14, 2026 19:45
Copilot AI lite review requested due to automatic review settings August 14, 2026 19:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 MSBUILDDEBUGENGINE to enable the debug engine on non-Windows platforms, while preserving existing MSBuildDebugEngine behavior.
  • 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.

Comment thread src/Build.UnitTests/BackEnd/DebugUtils_tests.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MSBuildDebugEngine env var casing

4 participants