Skip to content

Commit 3857ca2

Browse files
authored
Update MSTest v4 migration notes for MSTest.Sdk break around VSTest
Clarify changes in MSTest v4 regarding default settings and package references.
1 parent fa2db7c commit 3857ca2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/core/testing/unit-testing-mstest-migration-v3-v4.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,9 @@ To address long outstanding bugs that many users filed, the generation of `TestC
213213
### TreatDiscoveryWarningsAsErrors now defaults to true
214214

215215
v4 uses stricter defaults. As such, the default value of `TreatDiscoveryWarningsAsErrors` is now `true`. This should be a transparent change for most users and should help other users to uncover hidden bugs.
216+
217+
### MSTest.Sdk no longer adds `Microsoft.NET.Test.Sdk` reference when using Microsoft.Testing.Platform
218+
219+
MSTest.Sdk, by default, uses Microsoft.Testing.Platform, unless `UseVSTest` MSBuild property is set to true. In MSTest 3.x, the SDK still adds reference to Microsoft.NET.Test.Sdk (which brings VSTest support) even when using Microsoft.Testing.Platform. This package reference is unneeded when running with Microsoft.Testing.Platform, and thus is removed in MSTest v4.
220+
221+
If you still want to have VSTest supported (for example, if you want to run with vstest.console), you need to manually add a package reference to `Microsoft.NET.Test.Sdk` NuGet package to your project.

0 commit comments

Comments
 (0)