Skip to content

Clarify MSTest.Sdk incompatibility with ASP.NET Core (Microsoft.NET.Sdk.Web)#54554

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/how-to-write-integration-tests-mstest-sdk
Draft

Clarify MSTest.Sdk incompatibility with ASP.NET Core (Microsoft.NET.Sdk.Web)#54554
Copilot wants to merge 3 commits into
mainfrom
copilot/how-to-write-integration-tests-mstest-sdk

Conversation

Copilot AI commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

The "Enable MTP in an MSTest project" section didn't explain that MSTest.Sdk replaces Microsoft.NET.Sdk as the project SDK—making it incompatible with ASP.NET Core integration test projects that require Microsoft.NET.Sdk.Web. The "alternatively" paragraph also didn't make clear when to use manual configuration over the SDK approach.

Changes

  • Rewrote intro paragraph — Direct imperative form; explicitly states that MSTest.Sdk replaces Microsoft.NET.Sdk as the project SDK with MTP enabled by default.
  • Added NOTE callout — Calls out that MSTest.Sdk isn't compatible with projects requiring a different SDK, with Microsoft.NET.Sdk.Web (ASP.NET Core) as the concrete example.
  • Rewrote the "alternatively" paragraph — Now clearly scoped to projects using a SDK other than Microsoft.NET.Sdk. Removed the "We strongly recommend" phrasing per style guide.

Copilot AI requested review from Copilot and removed request for Copilot June 26, 2026 22:42
Copilot AI requested review from Copilot and removed request for Copilot June 26, 2026 22:44
Copilot AI requested review from Copilot and removed request for Copilot June 26, 2026 22:45
Copilot AI changed the title [WIP] Add example for integration tests with MSTest SDK Clarify MSTest.Sdk incompatibility with ASP.NET Core (Microsoft.NET.Sdk.Web) Jun 26, 2026
Copilot AI requested a review from adegeo June 26, 2026 22:46

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`.

@Youssef1313 Youssef1313 Jun 27, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Have we tried one of the following?

<Project Sdk="Microsoft.NET.Sdk.Web">
  <Import Project="Sdk.props" Sdk="MSTest.Sdk" />

  // ...

  <Import Project="Sdk.targets" Sdk="MSTest.Sdk" />
</Project>

or

<Project Sdk="MSTest.Sdk">
  <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk.Web" />

  // ...

  <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk.Web" />
</Project>

to see if that works? And if it does work, do we want to make that recommendation?

And if it doesn't work, is there anything that MSTest.Sdk could adjust to make that work?

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