0

I recently checked in my solution after adding some functionality. Besides that I refactored some unit tests but did not touch any of the unit test framework versions or what not.

After checking in to our TFS server the TFS server runs all the tests himself. After these tests succeeding however, I get this message:

Error: An exception occurred while invoking executor 'executor://mstestadapter/v2': Constructor on type 'Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.UnitTestRunner' not found.

I've read online that it has to do with having different versions of your test framework on different projects in the same solution, but I only have one test project in my entire solution.

My test project only has this reference to a unit test framework

Microsoft.VisualStudio.QualityTools.UnitTestFramework

With runtime version: 2.0.50727 and version: 10.0.0.0

Jeroen
  • 1,625
  • 3
  • 16
  • 28

2 Answers2

1

A colleague of mine fixed the issue by making sure all the test runners were using the same version.

Jeroen
  • 1,625
  • 3
  • 16
  • 28
0

Suggest you also run from vstest.console.exe command line in the build agent. TFS is also running the same command line to invoke the test operation. This will narrow down if the issue is related to TFS side or your build agent environment.

Not sure how you configure the MSTest.TestAdapter and MSTest.TestFramework NuGet Packages in your solution. Consolidating them to the latest version and try it again.

Also enable the Verbose Debug Mode to get more detail info for trouble shooting by set the ‘system.debug’ variable to true. Enable Verbose Debug Mode for TFS Build vNext

Chamberlain
  • 881
  • 5
  • 17