Modernize stale docs (TFMs, code coverage, env vars, MTP context) - #16279
Merged
Azat Mukhametshin (azat-msft) merged 11 commits intoJul 15, 2026
Conversation
…olution) Source-grounded modernization of 2022-era docs. TODO/placeholder resolution is handled in a separate PR. - configure.md: current TFM examples (net462/net8.0+), TestSettings deprecation note, dead MSDN link -> Learn, .NET Full/.NET Core wording -> .NET Framework/.NET. - extensions/datacollector.md: modern TFMs, drop 15.x version gating, fix buggy code sample, add dotnet test --collect equivalent. - extensions/datacollector-migration.md: drop stale preview package version pin. - dotnetcoretests.md: rewrite for modern SDK-style projects. - Overview.md: refresh "How it works" intro (components + MTP context), drop the broken #cancel/#abort links, and correct the protocol version range to the source-verified Version0..Version7. - environment-variables.md: per-variable code verification; mark removed/obsolete vars. - quickstart.md: populate empty file with getting-started links. - report.md: note dotnet vstest is deprecated in favor of dotnet test. - testplatform-migration-known-issues.md: typo fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e840b63-ad95-40c2-9ef8-5f2fcc4cfdaa
Copilot started reviewing on behalf of
Azat Mukhametshin (azat-msft)
July 14, 2026 10:10
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Modernizes multiple 2022-era documentation pages across VSTest to reflect current TFMs, command usage, deprecations, and protocol/environment-variable details, aligning the docs more closely with current source and Microsoft Learn guidance.
Changes:
- Refreshes runsettings/configuration docs with modern TFMs and updated terminology.
- Updates extensibility docs (data collectors) with corrected API signatures and modern CLI usage patterns.
- Revises platform overview/environment variable docs to better match current implementation and observed behavior.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/configure.md | Updates runsettings examples/terminology and adds a TestSettings deprecation note. |
| docs/dotnetcoretests.md | Rewrites guidance for modern SDK-style test projects and dotnet test behavior. |
| docs/environment-variables.md | Reframes env var list as “source-handled + historical” and marks some variables removed/obsolete. |
| docs/extensions/datacollector-migration.md | Removes stale preview package pin and updates the package link. |
| docs/extensions/datacollector.md | Updates TFMs, fixes/modernizes sample code, and adds dotnet test --collect guidance. |
| docs/Overview.md | Refreshes “How it works” intro and updates stated protocol version range. |
| docs/quickstart.md | Populates the previously empty quickstart with authoritative getting-started links. |
| docs/report.md | Notes dotnet vstest deprecation in the console logger syntax section. |
| docs/testplatform-migration-known-issues.md | Fixes a typo in an issue description. |
Comments suppressed due to low confidence (1)
docs/Overview.md:302
- The updated note about the supported protocol range (Version0..Version7) is source-grounded, but the version feature list below still claims version 7 added SkippedDiscoveredSources. In current source, the only explicitly version-7 message is
EditorAttachDebugger2(seeMessageTypeattributes), so the version-7 bullet should be updated to match the source.
The current source defines `Version0` as the lowest supported protocol version and `Version7` as the highest supported protocol version.
Versions:
- 0: The original base protocol with no explicit versioning in the message. It is used during negotiation.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Azat Mukhametshin (azat-msft)
July 14, 2026 10:29
View session
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Azat Mukhametshin (azat-msft)
July 14, 2026 12:45
View session
- Restore VSTEST_DUMP_FORCENETDUMP 'Removed in 18.5' note (valuable, recent info) - Clarify VSTEST_CONSOLE_PATH is consumed by the .NET SDK dotnet test forwarding app, not removed - Keep VSTEST_WINAPPHOST_* description as-is (used for Windows App Host/UWP scenarios) - Remove obsolete VSTEST_EXPERIMENTAL_FORWARD_OUTPUT_FEATURE entry Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9db29e40-86e4-41ba-9f65-5689af04d1e4
Copilot started reviewing on behalf of
Azat Mukhametshin (azat-msft)
July 15, 2026 12:53
View session
- VSTEST_DUMP_FORCENETDUMP: restore present-tense Description and Values row - VSTEST_WINAPPHOST_*: describe accurately based on DotnetTestHostManager source (apphost DOTNET_ROOT prefix, since refactored) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9db29e40-86e4-41ba-9f65-5689af04d1e4
Copilot started reviewing on behalf of
Azat Mukhametshin (azat-msft)
July 15, 2026 13:02
View session
… UWP/MAUI Research: v17.7.2 DotnetTestHostManager comment shows the SDK set the prefix for private-install DOTNET_ROOT resolution of the custom testhost.exe app host. No reference in microsoft/testfx, dotnet/maui, or any UWP/WinUI code. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9db29e40-86e4-41ba-9f65-5689af04d1e4
Copilot started reviewing on behalf of
Azat Mukhametshin (azat-msft)
July 15, 2026 13:18
View session
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9db29e40-86e4-41ba-9f65-5689af04d1e4
Copilot started reviewing on behalf of
Azat Mukhametshin (azat-msft)
July 15, 2026 13:29
View session
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Azat Mukhametshin (azat-msft)
July 15, 2026 15:12
View session
…curacy) - datacollector.md: guard nullable this.context in later snippets, drop misleading logger?. null-conditional (Initialize params are non-null), add missing using System.Collections.Generic to the env-vars snippet - Overview.md: remove misleading '.NET 10' qualifier and fix 'For those sources' wording - environment-variables.md: narrow VSTEST_CONSOLE_PATH claim to 'no reference under src\\' - testplatform-migration-known-issues.md: 'current running process' -> 'currently running process' Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9db29e40-86e4-41ba-9f65-5689af04d1e4
Comment on lines
141
to
+145
| { | ||
| // Session level attachment | ||
| this.dataCollectionSink.SendFileAsync(this.context.SessionDataCollectionContext, filename, true); | ||
| this.dataSink.SendFileAsync(this.context.SessionDataCollectionContext, filename, true); | ||
| // TestCase level attachment | ||
| this.dataCollectionSink.SendFileAsync(e.Context, filename, true); | ||
| this.dataSink.SendFileAsync(e.Context, filename, true); |
Comment on lines
243
to
245
| ### VSTEST_WINAPPHOST_* | ||
| - **Description**: Various environment variables related to Windows App Host configuration. | ||
| - **Description**: Prefix historically read by `DotnetTestHostManager` when launching the custom Windows app host (`testhost.exe`). The .NET SDK set `VSTEST_WINAPPHOST_DOTNET_ROOT` / `VSTEST_WINAPPHOST_DOTNET_ROOT(x86)` to support private-install scenarios; vstest forwarded them (stripping the prefix) as `DOTNET_ROOT` / `DOTNET_ROOT(x86)` so the app host could locate the runtime. Here "app host" means the native `testhost.exe` launcher — this is **not** related to the Windows App SDK, UWP, or .NET MAUI. Current source sets the standard `DOTNET_ROOT` / `DOTNET_ROOT(x86)` / `DOTNET_ROOT_<ARCH>` variables directly, so the `VSTEST_WINAPPHOST_` prefix is no longer emitted by `src\`. | ||
| - **Pattern**: Variables following the pattern `VSTEST_WINAPPHOST_{VARIABLE_NAME}` |
| #### Syntax | ||
|
|
||
| For dotnet test or dotnet vstest: | ||
| For dotnet test or dotnet vstest (note: `dotnet vstest` is deprecated in favor of `dotnet test`, which can run assemblies directly): |
Copilot started reviewing on behalf of
Azat Mukhametshin (azat-msft)
July 15, 2026 15:17
View session
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9db29e40-86e4-41ba-9f65-5689af04d1e4
Copilot started reviewing on behalf of
Azat Mukhametshin (azat-msft)
July 15, 2026 15:21
View session
…superseded) - environment-variables.md: clarify VSTEST_WINAPPHOST_ is not referenced under this repo's current src/ (mechanism existed in older versions ~17.7) - report.md: 'deprecated in favor of' -> 'superseded by' with Microsoft Learn link Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9db29e40-86e4-41ba-9f65-5689af04d1e4
|
|
||
| [DataCollectorFriendlyName("NewDataCollector")] | ||
| [DataCollectorTypeUri("my://new/datacollector")] | ||
| class NewDataCollector : DataCollector, ITestExecutionEnvironmentSpecifier |
Comment on lines
244
to
245
| - **Description**: Prefix historically read by `DotnetTestHostManager` when launching the custom Windows app host (`testhost.exe`). The .NET SDK set `VSTEST_WINAPPHOST_DOTNET_ROOT` / `VSTEST_WINAPPHOST_DOTNET_ROOT(x86)` to support private-install scenarios; vstest forwarded them (stripping the prefix) as `DOTNET_ROOT` / `DOTNET_ROOT(x86)` so the app host could locate the runtime. Here "app host" means the native `testhost.exe` launcher — this is **not** related to the Windows App SDK, UWP, or .NET MAUI. Current source sets the standard `DOTNET_ROOT` / `DOTNET_ROOT(x86)` / `DOTNET_ROOT_<ARCH>` variables directly, so the `VSTEST_WINAPPHOST_` prefix is no longer emitted by `src\`. | ||
| - **Pattern**: Variables following the pattern `VSTEST_WINAPPHOST_{VARIABLE_NAME}` |
Copilot started reviewing on behalf of
Azat Mukhametshin (azat-msft)
July 15, 2026 15:26
View session
| { | ||
| // Session level attachment | ||
| this.dataCollectionSink.SendFileAsync(this.context.SessionDataCollectionContext, filename, true); | ||
| // Session level attachment. environmentContext can be null, so guard before using it. |
Comment on lines
+159
to
+160
| logger.LogError(this.context.SessionDataCollectionContext, new Exception("my exception")); | ||
| logger.LogWarning(this.context.SessionDataCollectionContext, "my warning"); |
Jakub Jareš (nohwnd)
approved these changes
Jul 15, 2026
Azat Mukhametshin (azat-msft)
merged commit Jul 15, 2026
821d5b6
into
microsoft:main
16 checks passed
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.
Source-grounded modernization of stale 2022-era docs. The
TODO/placeholder resolution is handled separately in its own PR; this PR contains only the modernization changes.net462/net8.0+), TestSettings deprecation note, dead MSDN link -> Learn, and.NET Full/.NET Corewording ->.NET Framework/.NET.dotnet test --collectequivalent.15.5.0-previewpackage version pin.#cancel/#abortlinks, and correct the protocol version range to the source-verifiedVersion0..Version7.dotnet vstestis deprecated in favor ofdotnet test.