Remove obsolete MSTest 5 and Microsoft.Testing.Platform 3 compatibility APIs and configuration aliases

オープン
#12,312 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Evangelink がすでに取り組んでいます。

2026年11月10日 から。

  • #12322 @Evangelink による — オープン

評価

この issue はまだ評価されていません。

説明

type/breaking-change

Scope and rationale

Track the six approved major-version removal groups for MSTest 5.0 / Microsoft.Testing.Platform (MTP) 3.0. The reviewed source and implementation baseline is 471a807cf8182e0bcd0d9967c8dbf002c04945d2. This is planned breaking cleanup, not authorization to remove other compatibility surfaces.

Intended breaks and migrations

  • MSTest TestResult unused properties: remove InnerResultsCount, DatarowIndex, and ReturnValue from Microsoft.VisualStudio.TestTools.UnitTesting.TestResult. They are already obsolete-as-error and have no supported effect. Custom result producers and reflection/binary consumers must stop accessing them; no replacement is needed for these unused values. Other result properties and .NET Framework remoting remain supported.
  • MTP internal Helpers.AppVersion: remove the obsolete compatibility type and DefaultSemVer. Migrate the remaining in-repository test to PlatformVersion.Version. Friend/source consumers that use this internal shim must also migrate. Do not remove unrelated extension version helpers or friend grants.
  • MTP TestApplication.CreateServerModeBuilderAsync: remove the obsolete public method. Call TestApplication.CreateBuilderAsync with exactly one explicit --server argument. The removed helper injected/deduplicated the server switch, so changing only the method name is not an equivalent migration. Already-compiled callers need an upgraded/recompiled consumer.
  • MTP CancelledTestNodeStateProperty: remove the obsolete public in-process test-node state, its public/internal API records through explicit removal entries, and branches/suppressions/tests that exist only for that state. Test frameworks should throw OperationCanceledException carrying MTP's supplied cancellation token instead. Audit terminal/TRX/HTML/CI reporters, category/result aggregation, JSON-RPC, dotnet-test IPC, Retry, HangDump and CrashDump. Update the linked server-client source package and its tests as well as the platform. Preserve functional cancellation, fault observation, and older-peer wire states unless a separately established protocol contract requires a targeted migration. Extensions that still bind to the removed CLR type must upgrade; identify any exact compatibility dependency rather than dropping all old-extension support.
  • MTP diagnostic environment aliases: remove TESTINGPLATFORM_DIAGNOSTIC_OUTPUT_FILEPREFIX and TESTINGPLATFORM_DIAGNOSTIC_FILELOGGER_SYNCHRONOUSWRITE, their fallback reads, deprecation warnings, and directly dependent resources/tests. Set TESTINGPLATFORM_DIAGNOSTIC_FILE_PREFIX and TESTINGPLATFORM_DIAGNOSTIC_SYNCHRONOUS_WRITE respectively. The old names will no longer affect configuration; supported CLI/environment precedence must remain intact.
  • MSTest flat ordering configuration alias: remove the fallback and warning for mstest:orderTestsByNameInClass. Use mstest:execution:orderTestsByNameInClass in testconfig.json. The removed flat key will no longer enable ordering; defaults and the nested setting remain unchanged.

Consumer and compatibility boundaries

The API removals intentionally break source/binary consumers of those exact APIs. Keep shipped API history intact and record approved removals with *REMOVED* entries in the appropriate unshipped public/internal baselines. Do not silently widen this to other shims, defaults, or protocol changes.

ForwardCompatibilityTests currently exercises older 2.2.1 extensions and MSBuild 2.3.0; TelemetryForwardCompatibilityTests exercises telemetry 2.0.0 on .NET Framework. Preserve this compatibility coverage wherever it does not depend on the specifically removed state. Establish/document the exact dependency of an old consumer that must upgrade instead of deleting unrelated compatibility tests.

Explicitly excluded: the old orchestrator facade; parameterless IProcess.WaitForExitAsync; compatibility-only polyfill exports; old-engine friend grants; --no-progress / --no-ansi; HangDump %p; legacy OpenTelemetry output; serialization constructors; HasExitedGracefully renaming; IsTestingPlatformApplication default changes; UWP/WinUI package splitting; assertion misuse guards; VSTest interface implementations; .NET Framework remoting; Jsonite; necessary polyfills; functional cancellation/fault observation.

Delivery and validation

Update directly related migration/changelog documentation, preserve UTF-8 BOM in C# sources, and regenerate removed localization entries via each owning project's UpdateXlf target. Use the repository-pinned SDK/build scripts. Keep focused consumer coverage for supported configuration, explicit server mode, token cancellation, linked source-only clients and relevant old extensions. Pack before package-consuming acceptance runs; identify the actual packages/binaries consumed. Distinguish executed behavior evidence from compilation, static predictions, skipped/zero-test runs and unavailable platform checks. No pull request is requested by this issue creation.

Verified extension migration dependencies

Removing the approved internal AppVersion shim is also a binary break for older friend assemblies, not just an in-repository test migration. Package metadata and a real packed consumer established these specific dependencies:

Consumer Removed binding in the old binary Migration exercised with MTP 3
CrashDump 2.2.1 AppVersion; CrashDump 2.3.0 instead binds CancelledTestNodeStateProperty Matching current CrashDump build.
HangDump 2.2.1 Both AppVersion and CancelledTestNodeStateProperty Matching current HangDump build.
Retry 2.2.1 AppVersion; Retry 2.3.0 binds the removed cancellation state Matching current Retry build.
TRX 2.2.1 AppVersion TRX 2.3.0 remains in the compatibility fixture because it binds neither removed type.
Platform.MSBuild 2.3.0 CancelledTestNodeStateProperty in its MSBuild consumer extension Matching current Platform.MSBuild build.
HotReload and Telemetry 2.2.1 Neither removed type Retained unchanged in the compatibility fixture.
Telemetry 2.0.0 on .NET Framework Neither removed type The existing enabled-telemetry canary is retained unchanged.

These are tested package combinations, not a universal or monotonic minimum-version promise for all 2.x extensions. The original fixture executed and failed with TypeLoadException naming the two removed types. The narrowly migrated mixed-version fixture passed, asserting the TRX result's exact name, Passed outcome, and total/executed/passed counts of one. The unchanged telemetry 2.0.0 .NET Framework canary also passed. Local package-consuming validation used MSTest 5.0.0-dev and MTP 3.0.0-dev; it is not CI or published-release certification. Older-peer JSON-RPC canceled responses, cancellation requests, reserved IPC state values, and historical report-journal states remain supported.

主要言語
C#
スター
1.1k
フォーク
314
平均マージ
11時間 9分
マージ済み PR(30日)
340

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/testfx のほかの issue

microsoft/testfx の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。