From f4b77fd66e6a563c5d6d7763f15f32bdb95fe465 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 26 Jun 2026 22:42:24 +0000 Subject: [PATCH 1/5] Initial plan From 45c6fe4fb01c87fc3c75334d0bcb2816dcb82f3e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 26 Jun 2026 22:44:47 +0000 Subject: [PATCH 2/5] Clarify MSTest.Sdk incompatibility with ASP.NET Core projects in MTP docs --- docs/core/testing/unit-testing-mstest-running-tests.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/core/testing/unit-testing-mstest-running-tests.md b/docs/core/testing/unit-testing-mstest-running-tests.md index 150c83c95fb2b..31ba19cfd058d 100644 --- a/docs/core/testing/unit-testing-mstest-running-tests.md +++ b/docs/core/testing/unit-testing-mstest-running-tests.md @@ -23,9 +23,9 @@ The MSTest runner is open source and builds on the [MTP](./microsoft-testing-pla ## Enable MTP in an MSTest project -It's recommended to use [MSTest SDK](./unit-testing-mstest-sdk.md) as it greatly simplifies your project configuration and updating the project, and it ensures a proper alignment of the versions of the platform (MTP) and its extensions. +Use [MSTest SDK](./unit-testing-mstest-sdk.md) to greatly simplify your project configuration, version management, and alignment of MTP and its extensions. -When you use `MSTest SDK`, by default you're opted in to using MTP. +`MSTest.Sdk` replaces `Microsoft.NET.Sdk` as the project SDK, and MTP is enabled by default: ```xml @@ -39,7 +39,10 @@ When you use `MSTest SDK`, by default you're opted in to using MTP. ``` -Alternatively, you can enable MSTest runner by adding the `EnableMSTestRunner` property and setting `OutputType` to `Exe` in your project file. You also need to ensure that you're using `MSTest 3.2.0` or newer. We strongly recommend you update to the latest MSTest version available. +> [!NOTE] +> Because `MSTest.Sdk` replaces `Microsoft.NET.Sdk`, it isn't compatible with projects that require a different project SDK. For example, ASP.NET Core integration test projects that require `Microsoft.NET.Sdk.Web` can't use `MSTest.Sdk`. + +If your project uses a project SDK other than `Microsoft.NET.Sdk`—for example, ASP.NET Core integration test projects that require `Microsoft.NET.Sdk.Web`—enable the MSTest runner by adding the `EnableMSTestRunner` property and setting `OutputType` to `Exe` in your project file. Ensure that you're using `MSTest 3.2.0` or newer, and update to the latest MSTest version available. Consider the following example project file: From 55709941a20f7de77d5057d39d85e683cd765fae Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 26 Jun 2026 22:45:40 +0000 Subject: [PATCH 3/5] Shorten long sentence in Enable MTP section --- docs/core/testing/unit-testing-mstest-running-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/testing/unit-testing-mstest-running-tests.md b/docs/core/testing/unit-testing-mstest-running-tests.md index 31ba19cfd058d..47175cb5b58cc 100644 --- a/docs/core/testing/unit-testing-mstest-running-tests.md +++ b/docs/core/testing/unit-testing-mstest-running-tests.md @@ -42,7 +42,7 @@ Use [MSTest SDK](./unit-testing-mstest-sdk.md) to greatly simplify your project > [!NOTE] > Because `MSTest.Sdk` replaces `Microsoft.NET.Sdk`, it isn't compatible with projects that require a different project SDK. For example, ASP.NET Core integration test projects that require `Microsoft.NET.Sdk.Web` can't use `MSTest.Sdk`. -If your project uses a project SDK other than `Microsoft.NET.Sdk`—for example, ASP.NET Core integration test projects that require `Microsoft.NET.Sdk.Web`—enable the MSTest runner by adding the `EnableMSTestRunner` property and setting `OutputType` to `Exe` in your project file. Ensure that you're using `MSTest 3.2.0` or newer, and update to the latest MSTest version available. +If your project uses a SDK other than `Microsoft.NET.Sdk`—for example, `Microsoft.NET.Sdk.Web` for ASP.NET Core integration tests—enable the MSTest runner manually. Add the `EnableMSTestRunner` property and set `OutputType` to `Exe` in your project file. Ensure that you're using `MSTest 3.2.0` or newer, and update to the latest MSTest version available. Consider the following example project file: From d4c76c0c2d8cc0cfa673a427ca2246d14bbab7bd Mon Sep 17 00:00:00 2001 From: "Andy (Steve) De George" <67293991+adegeo@users.noreply.github.com> Date: Wed, 1 Jul 2026 14:53:46 -0700 Subject: [PATCH 4/5] Update MSTest.Sdk compatibility notes in documentation Clarify compatibility of MSTest.Sdk with project SDKs and provide instructions for manual configuration. --- docs/core/testing/unit-testing-mstest-running-tests.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/core/testing/unit-testing-mstest-running-tests.md b/docs/core/testing/unit-testing-mstest-running-tests.md index 47175cb5b58cc..9e54ebf1a9438 100644 --- a/docs/core/testing/unit-testing-mstest-running-tests.md +++ b/docs/core/testing/unit-testing-mstest-running-tests.md @@ -40,9 +40,11 @@ Use [MSTest SDK](./unit-testing-mstest-sdk.md) to greatly simplify your project ``` > [!NOTE] -> Because `MSTest.Sdk` replaces `Microsoft.NET.Sdk`, it isn't compatible with projects that require a different project SDK. For example, ASP.NET Core integration test projects that require `Microsoft.NET.Sdk.Web` can't use `MSTest.Sdk`. +> `MSTest.Sdk` works only when your project can use `Microsoft.NET.Sdk` as its base SDK. If your project requires a different SDK, don't replace the `` value with `MSTest.Sdk`. +> +> For example, ASP.NET Core integration test projects use `Microsoft.NET.Sdk.Web`. `MSTest.Sdk` derives from `Microsoft.NET.Sdk`, so it doesn't import the ASP.NET Core SDK targets that `Microsoft.NET.Sdk.Web` provides. -If your project uses a SDK other than `Microsoft.NET.Sdk`—for example, `Microsoft.NET.Sdk.Web` for ASP.NET Core integration tests—enable the MSTest runner manually. Add the `EnableMSTestRunner` property and set `OutputType` to `Exe` in your project file. Ensure that you're using `MSTest 3.2.0` or newer, and update to the latest MSTest version available. +If your project uses an SDK other than `Microsoft.NET.Sdk`, keep that SDK, and configure MSTest manually. Add the `EnableMSTestRunner` property and set `OutputType` to `Exe` in your project file. Then add the MSTest references that your project requires. Ensure that you're using MSTest 3.2.0 or newer, and update to the latest MSTest version available. Consider the following example project file: From 0a755d91ac1e54b7ce1846a9717714e551ceeea6 Mon Sep 17 00:00:00 2001 From: "Andy (Steve) De George" <67293991+adegeo@users.noreply.github.com> Date: Wed, 1 Jul 2026 15:33:12 -0700 Subject: [PATCH 5/5] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- docs/core/testing/unit-testing-mstest-running-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/testing/unit-testing-mstest-running-tests.md b/docs/core/testing/unit-testing-mstest-running-tests.md index 9e54ebf1a9438..8aee0f1e8bd54 100644 --- a/docs/core/testing/unit-testing-mstest-running-tests.md +++ b/docs/core/testing/unit-testing-mstest-running-tests.md @@ -44,7 +44,7 @@ Use [MSTest SDK](./unit-testing-mstest-sdk.md) to greatly simplify your project > > For example, ASP.NET Core integration test projects use `Microsoft.NET.Sdk.Web`. `MSTest.Sdk` derives from `Microsoft.NET.Sdk`, so it doesn't import the ASP.NET Core SDK targets that `Microsoft.NET.Sdk.Web` provides. -If your project uses an SDK other than `Microsoft.NET.Sdk`, keep that SDK, and configure MSTest manually. Add the `EnableMSTestRunner` property and set `OutputType` to `Exe` in your project file. Then add the MSTest references that your project requires. Ensure that you're using MSTest 3.2.0 or newer, and update to the latest MSTest version available. +If your project uses an SDK other than `Microsoft.NET.Sdk`, keep that SDK, and configure MSTest manually. Add the `EnableMSTestRunner` property and set `OutputType` to `Exe` in your project file. Then add the MSTest references that your project requires. Ensure that you're using MSTest 3.2.0 or newer, and update to the latest MSTest version available. The following example uses `Microsoft.NET.Sdk`, but the same properties work with other project SDKs (for example, `Microsoft.NET.Sdk.Web`). Consider the following example project file: