Alex Rivera | Logout

vstest.executionengine.x86.exe not closing

Asked 2012-11-21T16:02:23.580
50

I've encountered an error when running unit tests. If I Debug the unit tests vstest.executionengine.x86.exe runs, then closes when the tests pass.

If I just run the tests (Even if the test is as simple as just creating a new list, with no asserts) vstest.executionengine.x86.exe doesn't close and stays running in task manager.

This is causing an issue for me when it comes to writing more complicated tests that include removing files / cleaning up sqllite databases.

Any help would be appreciated.

EDIT :

Steps to reproduce :

  • Create New Unit Test Project
  • Debug Unit Tests - vstest.executionengine.x86 opens and closes, test passes.
  • Run Unit Tests - vstest.executionengine.x86 opens and stays open
Edit
Report

1 Answer

41

I worked around this by using the following as a pre-build event on the affected test projects:

for 64-bit:

taskkill /F /IM vstest.executionengine.exe /FI "MEMUSAGE gt 1"

or for 32-bit:

taskkill /F /IM vstest.executionengine.x86.exe /FI "MEMUSAGE gt 1"

This silently kills the execution engine before building the test project. The /FI "MEMUSAGE gt 1" stops the command (and therefore the build) from failing if the execution engine isn't running.

answered 2013-02-03T21:12:47.130

Your Answer