Failed to queue test run: Unable to start the agen

2019-02-17 05:12发布

问题:

While trying to run all the unit tests in my solution(Visual Studio 2010) I am getting a 'Failed to queue test run xxxx@MACHINENAME 2010-06-23 14:01:36': Unable to start the agent process' error. Does anyone know what causes this particular error to occur and how to resolve it so that I can run my unit tests?

Thanks

回答1:

I don't know if this is still the case for Visual Studio 2010, but you could have this same scenario in Visual Studio 2008. When breaking off a unit test run (i.e. when detecting erroneous code while debugging a unit test) it would leave a process running.

The process that is hindering execution for Visual Studio 2008 and has to be killed to be able to unit test again is VSPerfMon.exe. Might be wort a look for VS2010.



回答2:

I know this question was asked long before .NET 4.5, but I've found that I get this error on VS2010 after installing .NET 4.5.

A "solution" (not the most helpful one - I know) is obviously to uninstall .NET 4.5. I guess / hope there will be an update to Visual Studio 2010 at some point to resolve this.

UPDATE

I had a similar error, when trying to run tests which used TypeMock. In order to solve the problem I opened up my solution in Visual Studio and selected Test - Edit Test Settings. In the Test Settings dialog I selected Hosts and switched it to Run tests in 64 bit process on 64 bit machine.



回答3:

This is possibly because you have previously run your tests and stopped them before they completed (possibly because you were debugging and you hit a breakpoint) leaving the test agent process still running, you are then unable to start a second instance. The name of the process escapes me at the moment but if find the process in task manager and kill it off, this will hopefully solve your problem.



回答4:

I had similar problem in VS 2008. I solved it only after disabling second network adapter (or all adapters except one). Try, it might help for VS 2010 too.



回答5:

I'm getting this error in VS 2013 RC (it's in beta), and have found that closing and reopening VS causes it to go away.