When I was running unit tests on Visual Studio 2008, the entire test-run fails and in the “Test Run Errors and Warnings”-section I found the following error:
Code coverage instrumentation warning while processing file Project.exe:
Code coverage collection error: The Visual Studio performance and coverage logging engine is already running on the computer. Therefore, the test run cannot continue. Close the pending performance or code coverage session and then rerun the tests.
Restarting Visual Studio didn’t help, so I checked the Task Manager. There I found VSPerfMon which is the tool used by Visual Studio to collect performance data for the application. Kill this process and the tests will run again.
For more information on using VSPerfMon separately from Visual Studio (using command line), click here.
59dec6e1-203f-40cc-8852-4296567edba3|0|.0
Tags: