Skip to content

Modernize stale docs (TFMs, code coverage, env vars, MTP context) - #16279

Merged
Azat Mukhametshin (azat-msft) merged 11 commits into
microsoft:mainfrom
azat-msft:docs-tier2-rest
Jul 15, 2026
Merged

Modernize stale docs (TFMs, code coverage, env vars, MTP context)#16279
Azat Mukhametshin (azat-msft) merged 11 commits into
microsoft:mainfrom
azat-msft:docs-tier2-rest

Conversation

@azat-msft

Copy link
Copy Markdown
Member

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.

  • configure.md — current TFM examples (net462/net8.0+), TestSettings deprecation note, dead MSDN link -> Learn, and .NET Full/.NET Core wording -> .NET Framework/.NET.
  • extensions/datacollector.md — modern TFMs, drop 15.x version gating, fix the buggy code sample against the real DataCollector API, add a dotnet test --collect equivalent.
  • extensions/datacollector-migration.md — drop the stale 15.5.0-preview package version pin.
  • dotnetcoretests.md — rewrite for modern SDK-style projects.
  • Overview.md — refresh the "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 variables.
  • quickstart.md — populate the previously-empty file with getting-started links.
  • report.md — note that dotnet vstest is deprecated in favor of dotnet test.
  • testplatform-migration-known-issues.md — typo fix.

…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 AI review requested due to automatic review settings July 14, 2026 10:09

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

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 (see MessageType attributes), 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.

Comment thread docs/extensions/datacollector-migration.md Outdated
Comment thread docs/extensions/datacollector.md Outdated
Comment thread docs/environment-variables.md Outdated
Comment thread docs/environment-variables.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 14, 2026 10:28

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Comment thread docs/quickstart.md
Comment thread docs/extensions/datacollector-migration.md Outdated
Comment thread docs/extensions/datacollector.md Outdated
Comment thread docs/extensions/datacollector.md
Comment thread docs/extensions/datacollector.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 14, 2026 12:44

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Comment thread docs/extensions/datacollector.md Outdated
Comment thread docs/extensions/datacollector.md Outdated
Comment thread docs/environment-variables.md
Comment thread docs/environment-variables.md
Comment thread docs/environment-variables.md Outdated
Comment thread docs/environment-variables.md Outdated
- 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 AI review requested due to automatic review settings July 15, 2026 12:52

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Comment thread docs/testplatform-migration-known-issues.md Outdated
Comment thread docs/Overview.md Outdated
Comment thread docs/extensions/datacollector.md Outdated
Comment thread docs/extensions/datacollector.md
- 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 AI review requested due to automatic review settings July 15, 2026 13:01
… 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 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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread docs/testplatform-migration-known-issues.md Outdated
Comment thread docs/extensions/datacollector.md Outdated
Comment thread docs/extensions/datacollector.md Outdated
Copilot AI review requested due to automatic review settings July 15, 2026 13:18

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread docs/Overview.md Outdated
Comment thread docs/extensions/datacollector.md
Comment thread docs/extensions/datacollector.md
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9db29e40-86e4-41ba-9f65-5689af04d1e4
Copilot AI review requested due to automatic review settings July 15, 2026 13:29

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Comment thread docs/extensions/datacollector.md Outdated
Comment thread docs/environment-variables.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 15, 2026 15:11
…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

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

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}`
Comment thread docs/report.md Outdated
#### 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 AI review requested due to automatic review settings July 15, 2026 15:16

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread docs/environment-variables.md Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9db29e40-86e4-41ba-9f65-5689af04d1e4
Copilot AI review requested due to automatic review settings July 15, 2026 15:21
…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

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.


[DataCollectorFriendlyName("NewDataCollector")]
[DataCollectorTypeUri("my://new/datacollector")]
class NewDataCollector : DataCollector, ITestExecutionEnvironmentSpecifier
Comment thread docs/environment-variables.md Outdated
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 AI review requested due to automatic review settings July 15, 2026 15:25

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

{
// 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");
@azat-msft
Azat Mukhametshin (azat-msft) merged commit 821d5b6 into microsoft:main Jul 15, 2026
16 checks passed
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.

3 participants