MSTest.TestAdapter 4.5.3

MSTest.TestAdapter

MSTest is Microsoft supported Test Framework.

This package includes the adapter logic to discover and run tests. For access to the testing framework, install the MSTest.TestFramework package.

Getting started

After referencing both MSTest.TestAdapter and MSTest.TestFramework, define tests with [TestClass] and [TestMethod]:

using Microsoft.VisualStudio.TestTools.UnitTesting;

[TestClass]
public class CalculatorTests
{
    [TestMethod]
    public void AddReturnsExpectedResult()
        => Assert.AreEqual(4, 2 + 2);
}

Supported platforms:

  • .NET 4.6.2+
  • .NET 8.0+
  • .NET 8.0 Windows.18362+ (WinUI)
  • UWP 10.0.16299
  • UWP 10.0.17763 with .NET 9+

Classic UWP dependencies

The classic UWP adapter payload contains the adapter and its platform-services assembly. Microsoft.Testing.Platform and its extensions are restored from their own NuGet packages rather than duplicated inside this package. The classic UWP bootstrap also depends on the TRX reporting and Retry packages. The adapter's build targets include the resolved runtime assemblies in the AppX deployment.

Runsettings on Microsoft.Testing.Platform

When using the MSTest runner on Microsoft.Testing.Platform, .runsettings files can configure MSTest through the MSTest section (or its MSTestV2 alias), test parameters through TestRunParameters, and supported settings through RunConfiguration.

VSTest ISettingsProvider extensions are not invoked. Other top-level sections, such as Playwright, produce a warning and are not applied by MSTest. Use the extension's native Microsoft.Testing.Platform configuration when available. VSTest loggers, data collectors, and unsupported RunConfiguration entries retain their own warnings.

Result file attachments

When running on Microsoft.Testing.Platform, TestContext.AddResultFile registers an existing file as a test attachment. MSTest preserves successfully copied attachments in visible MSTest-<random-id> folders under the configured results directory so the published paths remain readable after the test host exits. Original files are not moved or deleted by this copying step.

These copies are final test results: apply your results-directory retention policy to remove them when they are no longer needed. TRX reporting can create an additional copy in its own attachment layout; follow the report's references rather than selecting a file by name from the entire results directory. Retry tooling can also publish additional copies from the final attempt. If an attachment cannot be copied, MSTest reports its original path so consumers can surface their usual missing-file or copy-failure diagnostics.

Documentation

For installation and configuration guidance, see https://learn.microsoft.com/dotnet/core/testing/unit-testing-mstest-getting-started.

For information about running tests, see https://learn.microsoft.com/dotnet/core/testing/unit-testing-mstest-running-tests.

No packages depend on MSTest.TestAdapter.

.NET Framework 4.6.2

.NET 8.0

.NET 8.0

.NET 9.0

.NET 9.0

UAP 10.0.16299

Version Downloads Last updated
4.5.3 1 11/13/2026
4.5.2 1 11/01/2026
4.5.1 1 11/01/2026
4.4.1 3 09/21/2026
4.4.0 3 09/21/2026
4.3.3 3 09/21/2026
4.3.2 4 07/23/2026
4.3.0 4 07/23/2026
4.2.3 5 05/19/2026
4.2.2 7 05/05/2026
4.2.1 7 04/26/2026
4.1.0 8 02/22/2026
4.0.2 9 01/16/2026
4.0.1 10 11/10/2025
4.0.0 10 11/10/2025
4.0.0-preview.25480.4 10 11/11/2025
4.0.0-preview.25465.3 10 11/11/2025
4.0.0-preview.25454.2 11 09/14/2025
4.0.0-preview.25452.10 11 09/15/2025
4.0.0-preview.25415.9 11 09/14/2025
4.0.0-preview.25372.6 11 09/14/2025
4.0.0-preview.25358.7 11 09/12/2025
3.11.1 8 01/16/2026
3.11.0 10 11/10/2025
3.10.5 9 01/16/2026
3.10.4 10 09/14/2025
3.10.3 11 09/14/2025
3.10.2 10 09/14/2025
3.10.1 11 09/14/2025
3.10.0 11 09/14/2025
3.9.3 12 07/08/2025
3.9.2 12 07/08/2025
3.9.1 12 07/08/2025
3.9.0 13 05/25/2025
3.9.0-preview.25167.10 13 05/28/2025
3.8.3 13 05/25/2025
3.8.2 12 05/25/2025
3.8.1 13 05/25/2025
3.8.0 13 05/25/2025
3.7.3 13 05/25/2025
3.7.2 13 05/25/2025
3.7.1 13 05/25/2025
3.7.0 13 05/25/2025
3.6.4 13 05/25/2025
3.6.3 13 05/25/2025
3.6.2 13 05/25/2025
3.6.1 13 05/25/2025
3.6.0 13 05/25/2025
3.5.2 13 05/25/2025
3.5.1 13 05/25/2025
3.5.0 13 05/25/2025
3.5.0-preview.24325.7 14 05/28/2025
3.4.3 13 05/25/2025
3.4.2 13 05/25/2025
3.4.1 13 05/25/2025
3.4.0 13 05/25/2025
3.3.1 13 05/25/2025
3.3.0 13 05/25/2025
3.3.0-preview.24164.4 13 05/28/2025
3.2.2 13 05/25/2025
3.2.1 13 05/25/2025
3.2.0 13 05/25/2025
3.2.0-preview.24069.3 13 05/28/2025
3.2.0-preview.23623.1 13 05/28/2025
3.2.0-preview.23622.1 13 05/28/2025
3.1.1 12 05/25/2025
3.0.4 12 05/25/2025
3.0.3 13 05/25/2025
3.0.2 13 05/25/2025
3.0.1 14 05/25/2025
3.0.0 13 05/25/2025
3.0.0-preview-20221122-01 13 05/26/2025
3.0.0-preview-20221110-04 13 05/26/2025
2.3.0-preview-20220810-02 13 05/26/2025
2.2.10 12 05/26/2025
2.2.10-preview-20220414-01 13 05/26/2025
2.2.9 13 05/25/2025
2.2.9-preview-20220210-07 13 05/26/2025
2.2.8 13 05/25/2025
2.2.7 13 05/25/2025
2.2.6 13 05/25/2025
2.2.5 13 05/25/2025
2.2.5-preview-20210605-01 14 05/26/2025
2.2.5-preview-20210604-01 12 05/26/2025
2.2.5-preview-20210531-02 14 05/26/2025
2.2.4 13 05/25/2025
2.2.4-preview-20210513-02 13 05/26/2025
2.2.4-preview-20210331-02 13 05/26/2025
2.2.3 13 05/25/2025
2.2.2 13 05/25/2025
2.2.1 14 05/25/2025
2.2.0-preview-20210115-03 13 05/26/2025
2.2.0-preview-20201126-03 13 05/26/2025
2.1.2 13 05/25/2025
2.1.1 13 05/25/2025
2.1.0 14 05/25/2025
2.1.0-beta2 13 05/26/2025
2.1.0-beta 13 05/25/2025
2.0.0 13 05/25/2025
2.0.0-beta4 13 05/26/2025
2.0.0-beta2 12 05/26/2025
1.4.0 13 05/25/2025
1.4.0-beta 13 05/25/2025
1.3.2 14 04/09/2025
1.3.1 13 05/25/2025
1.3.0 13 05/25/2025
1.3.0-beta2 13 05/26/2025
1.2.1 13 05/25/2025
1.2.0 13 05/25/2025
1.2.0-beta3 13 05/26/2025
1.2.0-beta 13 05/25/2025
1.1.18 13 05/25/2025
1.1.17 13 05/25/2025
1.1.14 13 05/25/2025
1.1.13 13 05/25/2025
1.1.12 14 05/25/2025
1.1.11 13 05/25/2025
1.1.10-rc2 11 05/26/2025
1.1.9-rc2 13 05/26/2025
1.1.8-rc 13 05/25/2025
1.1.6-preview 13 05/25/2025
1.1.5-preview 13 05/25/2025
1.1.4-preview 13 05/25/2025
1.1.3-preview 13 05/25/2025
1.1.1-preview 14 05/25/2025
1.0.3-preview 13 05/25/2025
1.0.2-preview 13 05/25/2025
1.0.0-preview 13 05/25/2025