Clarify MSTest.Sdk incompatibility with ASP.NET Core (Microsoft.NET.Sdk.Web)#54554
Draft
Copilot wants to merge 3 commits into
Draft
Clarify MSTest.Sdk incompatibility with ASP.NET Core (Microsoft.NET.Sdk.Web)#54554Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
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
Youssef1313
reviewed
Jun 27, 2026
|
|
||
| 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`. |
Member
There was a problem hiding this comment.
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?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Enable MTP in an MSTest project" section didn't explain that
MSTest.SdkreplacesMicrosoft.NET.Sdkas the project SDK—making it incompatible with ASP.NET Core integration test projects that requireMicrosoft.NET.Sdk.Web. The "alternatively" paragraph also didn't make clear when to use manual configuration over the SDK approach.Changes
MSTest.SdkreplacesMicrosoft.NET.Sdkas the project SDK with MTP enabled by default.MSTest.Sdkisn't compatible with projects requiring a different SDK, withMicrosoft.NET.Sdk.Web(ASP.NET Core) as the concrete example.Microsoft.NET.Sdk. Removed the "We strongly recommend" phrasing per style guide.