Skip to content

Update MSTest templates to v4 #50182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Update MSTest templates to v4 #50182

wants to merge 2 commits into from

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Aug 12, 2025

Description

We would like to update templates for MSTest to version 4 that is currently under development and that we will ship just before net10 is finalized. We want to make this change now, to have our changes dogfooded, and keep pushing newer versions mstest v4 previews into the templates until the release of .NET.

Customer Impact

Users creating new test projects for mstest will use v4, while previously they would use v3. Users are able to change the versions back to their preferred version by editing the generated files. Or they can migrate their other projects to v4 using this migration guide: https://learn.microsoft.com/dotnet/core/testing/unit-testing-mstest-migration-v3-v4 Breaking changes to v4 were kept to minimum.

NOTE: MSTest support policy explicitly states:

The MSTest team only supports the latest released version and strongly encourages its users and customers to always update to latest version to benefit from new improvements and security patches.

Regression?

No.

Risk

Low.

Users are able to easily revert their dependency versions to target MSTest v3. Once MSTest v4 is finalized, it will become the official release of MSTest and the only supported version of MSTest. Which is why we want to make the change now.

Link the PR to the original issue and to the PR to main.

Note any packaging impact. (If the changes touch code in a package that we ship out of band (OOB) then we will need to take care to ensure those packages ship.)

No impact.

Note any ref pack impact.

No impact.

@Copilot Copilot AI review requested due to automatic review settings August 12, 2025 06:53
@Youssef1313 Youssef1313 requested a review from a team as a code owner August 12, 2025 06:53
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Updates MSTest project templates from version 3.10.0 to version 4.0.0-preview.25372.6, modernizing the testing framework references and removing deprecated configuration properties.

  • Updates MSTest SDK and package references to version 4 preview
  • Removes deprecated testing platform configuration properties
  • Cleans up outdated comments and settings

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
Company.TestProject1.csproj (Playwright-MSTest-CSharp) Updates MSTest SDK and package to v4 preview, removes deprecated TestingPlatform properties
Company.TestProject1.vbproj (MSTest-VisualBasic) Updates MSTest SDK and package to v4 preview, removes deprecated TestingPlatform properties
Company.TestProject1.fsproj (MSTest-FSharp) Updates MSTest SDK and package to v4 preview, removes deprecated TestingPlatform properties
Company.TestProject1.csproj (MSTest-CSharp) Updates MSTest SDK and package to v4 preview, removes deprecated TestingPlatform properties
Comments suppressed due to low confidence (2)

Displays error on console in addition to the log file. Note that this feature comes with a performance impact.
For more information, visit https://learn.microsoft.com/dotnet/core/testing/unit-testing-platform-integration-dotnet-test#show-failure-per-test
-->
<TestingPlatformShowTestsFailure>true</TestingPlatformShowTestsFailure>
Copy link
Member Author

Choose a reason for hiding this comment

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

NOTES:

  • TestingPlatformShowTestsFailure and TestingPlatformDotnetTestSupport are specific to running Microsoft.Testing.Platform test apps with the old VSTest-based dotnet test. This will no longer be relevant for Microsoft.Testing.Platform 2.x which is used by MSTest 4.x.
  • Running MTP test apps with dotnet test will require dotnet.config setting test runner to MTP. So far, the template doesn't create that.

@Youssef1313
Copy link
Member Author

Approved via email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant