Repository navigation
Expose dotnet host selection in VsTestConsoleWrapper - #16802
Merged
Azat Mukhametshin (azat-msft) merged 1 commit intoDec 3, 2026
Merged
Azat Mukhametshin (azat-msft) merged 1 commit into
Azat Mukhametshin (azat-msft) merged 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Emanuel Fernandez Dell'Oca (emaf)
requested review from
Amaury Levé (Evangelink),
Azat Mukhametshin (azat-msft) and
Jakub Jareš (nohwnd)
as code owners
December 1, 2026 20:06
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change exposing per-wrapper dotnet host selection.
No open issues 🎉
What changed in this PR
Exposes per-wrapper dotnet host selection in VSTest’s translation layer, addressing #16801 without requiring process-wide PATH changes. Existing constructors and default host resolution remain unchanged.
Changes:
- Makes the existing host-path constructor public and registers it in the public API baseline.
- Documents explicit host selection, empty-path fallback, and direct executable launching.
- Adds tests for constructor visibility and explicit host-path handling without modifying
PATH.
| File | Description |
|---|---|
| test/TranslationLayer.UnitTests/VsTestConsoleWrapperTests.cs | Tests public constructor availability and host-path handling. |
| src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleWrapper.cs | Exposes and documents the host-path constructor. |
| src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/README.md | Adds usage guidance and explains host-selection behavior. |
| src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/PublicAPI/PublicAPI.Unshipped.txt | Registers the newly public constructor. |
Review effort: Balanced
Member
|
Yup, thanks |
Jakub Jareš (nohwnd)
approved these changes
Dec 2, 2026
Azat Mukhametshin (azat-msft)
enabled auto-merge (squash)
December 3, 2026 09:00
Member
|
/azp run microsoft.vstest |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Azat Mukhametshin (azat-msft)
merged commit Dec 3, 2026
911fd35
into
microsoft:main
27 checks passed
Emanuel Fernandez Dell'Oca (emaf)
deleted the
emaf-dev/ema/vstest-host-selection
branch
December 4, 2026 16:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
51c208b71fcf35052241b9e1e10030f67c4daa11↓ No end-to-end test launches a console with the selected host; net481 tests were not run on macOS.
Description
Expose the existing
VsTestConsoleWrapperconstructor that accepts adotnetexecutable path, allowing a caller to choose the host forvstest.console.dllwithout changing process-widePATH. Keep existing constructors and default host selection unchanged. Document the option and add focused tests for public availability and host selection.Validation:
./build.sh -c Release --projects "$PWD/test/TranslationLayer.UnitTests/TranslationLayer.UnitTests.csproj"— passed; seven existing trim-analysis warnings../build.sh -c Release --projects "$PWD/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Microsoft.TestPlatform.VsTestConsole.TranslationLayer.csproj"— passed for net462, net10.0, and netstandard2.0.DOTNET_ROOT="$PWD/.dotnet" ./.dotnet/dotnet test --project test/TranslationLayer.UnitTests/TranslationLayer.UnitTests.csproj -c Release -f net12.0 -- --report-trx— passed, 115 tests; TRX parsed and outcomes verified. net481 was compiled but not run on macOS.Related issue
Fixes #16801