Difference between Microsoft.VisualStudio.TestPlatform.TestFramework and Microsoft.VisualStudio.QualityTools.UnitTestFramework

SwissCoder picture SwissCoder · Mar 6, 2017 · Viewed 11.5k times · Source

I noticed a change in one of our solutions in VS 2015 today. It seems the test projects that are generated for the solution use a different namespace than the existing test projects in the same solution.

Only the test projects that reference

Microsoft.VisualStudio.QualityTools.UnitTestFramework

are recognized as test projects within Visual Studio 2015.

However there are now some test projects referencing

Microsoft.VisualStudio.TestPlatform.TestFramework Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions

It's possible that these test project where generated from VS 2017 RC. This would explain the different namespace. I didn't find any docs about backward compatibility.

Question is, which namespace to use? As we can't use both namespaces at the same time. What are the differences between the two namespaces?

VisualStudio 2015 is able to build the test projects with either reference. To switch the newer namespace back to the older namespace only because of the test project generation is not reason enough I think.

Answer

jessehouwing picture jessehouwing · Jul 12, 2017

MSTest has been released as a new NuGet package solution that is no longer tightly coupled to the Visual Studio version. Your new projects are using MSTest 2.0.

MSTest V2 release annoucement: https://devblogs.microsoft.com/devops/taking-the-mstest-framework-forward-with-mstest-v2/