Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 447
SwissCoder Avatar asked Mar 06 '17 09:03

SwissCoder


People also ask

What is MSTest TestAdapter?

NuGet Package MSTest. TestAdapter. The adapter to discover and execute MSTest Framework based tests. Supported platforms: - .NET 4.6.2+

What is MSTestV2?

MSTestV2 is open source. Uniform app-platform support – MSTestV2 is a converged implementation that offers uniform app-platform support across . NET Framework, . NET Core, ASP.NET Core, and UWP.


1 Answers

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/

like image 182
jessehouwing Avatar answered Sep 28 '22 00:09

jessehouwing