I am trying to write unit tests for my ASP.NET MVC 4 project's controllers using VS 2010 and MSTest. I have code coverage enabled for the project. When I run the tests individually, they run just fine. However, when I open the Test List Editor and run all the tests, I get the following messages (after some editing):
Cannot open the ASP.NET project.
Failed to queue tests for test run on agent: Exception has been thrown by the target of an invocation.
Test run could not be executed. No agents are marked online to execute test run.
I've never had this problem before. If I turn off code coverage for the MVC project, it works just fine. Is there a way to allow code coverage of an MVC project?