Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts dotnet test (Microsoft Testing Platform path) process startup so that environment variables provided via --environment are applied even when no launch profile / launchSettings is present, matching the expected CLI contract and addressing the repro for dotnet#54613.
Changes:
- Move application of
TestOptions.EnvironmentVariablesso it runs regardless of whetherModule.LaunchSettingsis present. - Preserve the precedence rule where command-line
--environmentvalues override launch profile environment variables (when present).
| // Env variables specified on command line override those specified in launch profile: | ||
| foreach (var (name, value) in TestOptions.EnvironmentVariables) | ||
| { | ||
| processStartInfo.Environment[name] = value; | ||
| } |
Skill vs. default Copilot review —
|
Repro of dotnet#54613 (env vars not applied to test process without launch profile). Base branch carries the code-review skill. Demo for skill-vs-default CCR comparison.