Testfx: MSTest.TestAdapter.Execution.UnitTestRunner not found VS2017 15.3

Created on 29 Jun 2017  路  6Comments  路  Source: microsoft/testfx

Wanting to reopen issue #166 as it does not seem to be resolved. I am running into issues with the error below running Visual Studio 15.3 (Preview 3) and using MSTest v1.1.18.

[6/29/2017 1:28:35 PM Error] An exception occurred while invoking executor 'executor://mstestadapter/v2': Constructor on type 'Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.UnitTestRunner' not found.

Downgrading to v1.1.14 seems to work for the time being.

Edit
Some more information: this never works in Debug mode.. but when running tests in Release.. it works fine.

Most helpful comment

I saw, that the problem occurred, when I have a several Unit Test projects in one solution with different versions of package MSTest.TestAdapter.

My solution:

  1. Update MSTest.TestAdapter to common version e.g. v1.1.18 in all Unit Test projects in solution.
  2. Close Visual Studio
  3. Remove directory C:\Users{user_name}\AppData\Local\Temp\VisualStudioTestExplorerExtensions
  4. Open Visual Studio, when you run tests package MSTest.TestAdapter will be downloaded

The Problem occure, when are many packages MSTest.TestAdapter in directory VisualStudioTestExplorerExtensions.

All 6 comments

I saw, that the problem occurred, when I have a several Unit Test projects in one solution with different versions of package MSTest.TestAdapter.

My solution:

  1. Update MSTest.TestAdapter to common version e.g. v1.1.18 in all Unit Test projects in solution.
  2. Close Visual Studio
  3. Remove directory C:\Users{user_name}\AppData\Local\Temp\VisualStudioTestExplorerExtensions
  4. Open Visual Studio, when you run tests package MSTest.TestAdapter will be downloaded

The Problem occure, when are many packages MSTest.TestAdapter in directory VisualStudioTestExplorerExtensions.

@walik92 I finally got it working after basically doing this:

  1. Close all instances of Visual Studio IDE
  2. Removed the NuGet packages directory
  3. Open up Visual Studio IDE
  4. Uninstall MSTest Framework and Adapter packages.
  5. Close all instances of Visual Studio IDE
  6. Open up Visual Studio IDE
  7. Reinstall MSTest Framework and Adapter packages.
  8. Build now runs... so irritating!

@Izzmo: Sorry you ran into this. This is being tracked by #177. @walik92 summarized it well except you do not need step#3. We are working to get this fixed in VS in the upcoming updates.

Ran in to the same issue. I'm going to try @walik92 suggestion...still kind of frustrating to apply a package update and now your test won't run !!

@sunitjoshi : Apologies again. We are tracking to fix this in an upcoming update.
Apart from the workarounds above, you could also perform the following:

  1. Kill all vstest.discoveryengine.exe and vstest.executionengine.exe processes. This should eliminate the adapter cache maintained in those processes.
  2. Re-build to retrigger discovery.

I had the same problem few moments ago.

First I panicked af. But after a quick search found this article and the steps from walik92.

What I did was

  1. Cleaned all temporary files from AppData\Local\Temp\
  2. Open VS (I run Enterprise 2017), right click on the References and open "Manage NuGet Packages"
  3. Run all updates for MSTest.TestAdapter and Selenium
  4. Close VS, reopen VS and my Project, and voil谩, mi test were rebuild and into the Test Explorer

I hope this would be useful for you guys.
If you have trouble finding the Temporary files on your machine, please visit my projects and use the RefreshR clean utility, check out the description and feel free to use it.

Best regards!

Was this page helpful?
0 / 5 - 0 ratings