microsoft / microsoft/testfx

Running MTP tests from Visual Studio Test Explorer does not honor `launchsettings.json`

Open
#11,315 0 comments 0 reactions 1 assignee View on GitHub

@drognanar is already working on this.

Since Sep 15, 2026.

external/test-explorer needs/triage
Dominant language
C#
Stars
1k
Forks
312
Avg merge
8h 30m
Merged PRs (30d)
469

Description

Describe the bug

When running MTP tests from the VS UI (via Test Explorer), the runner doesn't honor existing launchsettings.json files.

launchsettings.json is honored today via dotnet test.

Version used

MTP 2.3.3
Visual Studio 18.10.0

Steps To Reproduce

  1. Create a new MTP-based test project
  2. Create/edit a launch profile to generate a launchsettings.json
  3. Set an environment variable on launchsettings.json
  4. Run a test via Test Explorer
  5. Note the env var is not honored

Expected behavior

Launching a test through Test Explorer should respect launchsettings.json the same way dotnet test does.

Actual behavior

launchsettings.json is ignored.

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.