Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions docs/core/testing/unit-testing-mstest-migration-from-tmi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: MSTest migration from Legacy Test runner
description: Learn about migrating from Legacy test runner to latest MSTest.
author: nohwnd
ms.author: jajares
ms.date: 08/21/2025
---

# MSTest legacy runner migration guide

This guide assists users in upgrading their MSTest tests that rely on legacy test runner in Visual Studio and VSTest, to move to latest MSTest.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This guide assists users in upgrading their MSTest tests that rely on legacy test runner in Visual Studio and VSTest, to move to latest MSTest.
This guide assists you in upgrading your MSTest tests that rely on legacy test runner in Visual Studio and VSTest to the latest MSTest.


### Who is impacted?

Users who upgrade to VSTest 18.0.0 or newer and encounter error:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Users who upgrade to VSTest 18.0.0 or newer and encounter error:
If you upgrade to VSTest 18.0.0 or later and encounter error the following error, you need to migrate:


```plaintext
MSTest v1 run was offloaded to legacy TestPlatform runner, this is typically caused by:
- using .testsettings file
- setting ForcedLegacyMode in your runsettings file
- running Web and Load test (WLT)
- running Coded UI Tests (CUIT)
- running manual tests
- running generic tests

This runner was removed from the product and can no longer be used.
```

Version 18 of VSTest removed the ability to run MSTest v1 tests via the legacy runner (running MSTest v1 tests via VSTest remains unaffected.). The legacy runner, also called TMI, TPv0, QTAgent, was removed from VSTest and Visual Studio.

### Solving the error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Solving the error
### Resolve the error


The error can show up for multiple reasons, typically the reasons that are listed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The error can show up for multiple reasons, typically the reasons that are listed.
The error can appear for multiple reasons:
- [Using a .testsettings file](#using-a-testsettings-file)
- [Setting ForcedLegacyMode](#setting-forcedlegacymode)
- [Web and Load tests (WLT)](web-and-load-tests-wlt)
- [Coded UI tests (CUIT)](#coded-ui-tests-cuit)
- [Manual tests](#manual-tests)
- [Generic tests](#generic-tests)


#### Using .testsettings file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### Using .testsettings file
#### Using a .testsettings file


Providing `.testsettings` file to the run will trigger this error. Test settings files are no longer supported in VSTest and you should replace them with `.runsettings` file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Providing `.testsettings` file to the run will trigger this error. Test settings files are no longer supported in VSTest and you should replace them with `.runsettings` file.
Providing a `.testsettings` file to the run triggers this error. Test settings files are no longer supported in VSTest. Replace them with `.runsettings` files.


To migrate from testsettings to runsettings, you can use the TestSettings migrator tool that is shipped with Visual Studio 2022. For more information, see [Upgrade from .testsettings to .runsettings](https://learn.microsoft.com/visualstudio/test/migrate-testsettings-to-runsettings).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To migrate from testsettings to runsettings, you can use the TestSettings migrator tool that is shipped with Visual Studio 2022. For more information, see [Upgrade from .testsettings to .runsettings](https://learn.microsoft.com/visualstudio/test/migrate-testsettings-to-runsettings).
To migrate from testsettings to runsettings, you can use the TestSettings migrator tool that shipped with Visual Studio 2022. For more information, see [Upgrade from .testsettings to .runsettings](/visualstudio/test/migrate-testsettings-to-runsettings).


When moving away from testsettings, consider upgrading from MSTest v1 to latest MSTest following [this migration guide](unit-testing-mstest-migration-from-v1-to-v3.md).

#### Setting ForcedLegacyMode in runsettings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### Setting ForcedLegacyMode in runsettings
#### Setting ForcedLegacyMode


Inspect your runsettings file to see if `<ForcedLegacyMode>true</ForcedLegacyMode>` is set explicitly. This will force switching to the legacy MSTest runner. You need to remove this explicit setting.

#### Running Web and Load test (WLT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### Running Web and Load test (WLT)
#### Web and Load tests (WLT)


Web and Load test workload and adapter was deprecated and removed. If you still have the need to run Web and Load tests, avoid upgrading from VSTest 17.x.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Web and Load test workload and adapter was deprecated and removed. If you still have the need to run Web and Load tests, avoid upgrading from VSTest 17.x.
The Web and Load test workload and adapter was deprecated and removed. If you still need to run Web and Load tests, avoid upgrading from VSTest 17.x.


#### Running Coded UI Tests (CUIT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### Running Coded UI Tests (CUIT)
#### Coded UI tests (CUIT)


Coded UI test workload and adapter was deprecated and removed. If you still have the need to run Coded UI tests, avoid upgrading from VSTest 17.x.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Coded UI test workload and adapter was deprecated and removed. If you still have the need to run Coded UI tests, avoid upgrading from VSTest 17.x.
The Coded UI test workload and adapter was deprecated and removed. If you still need to run Coded UI tests, avoid upgrading from VSTest 17.x.


#### Running manual tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### Running manual tests
#### Manual tests


Manual test test type was deprecated and removed. If you still have the need to manual tests, avoid upgrading from VSTest 17.x.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Manual test test type was deprecated and removed. If you still have the need to manual tests, avoid upgrading from VSTest 17.x.
The manual-test test type was deprecated and removed. If you still need to run manual tests, avoid upgrading from VSTest 17.x.


#### Generic tests tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### Generic tests tests
#### Generic tests


Generic test test type was deprecated and removed. If you still have the need to manual tests, avoid upgrading from VSTest 17.x.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Generic test test type was deprecated and removed. If you still have the need to manual tests, avoid upgrading from VSTest 17.x.
The generic-test test type was deprecated and removed. If you still need to run generic tests, avoid upgrading from VSTest 17.x.

2 changes: 2 additions & 0 deletions docs/navigate/devops-testing/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ items:
href: ../../core/testing/unit-testing-mstest-migration-from-v1-to-v3.md
- name: Migrate from MSTest v3 to MSTest v4
href: ../../core/testing/unit-testing-mstest-migration-v3-v4.md
- name: MSTest migration from Legacy Test runner
href: ../../core/testing/unit-testing-mstest-migration-from-tmi.md
- name: Microsoft.Testing.Platform support (MSTest runner)
href: ../../core/testing/unit-testing-mstest-runner-intro.md
- name: Getting started
Expand Down