Launching unit tests in debugger fails every other time (cannot start QTAgent32.exe) - by jhaakana

Status : 

  Not Reproducible<br /><br />
		The product team could not reproduce this item with the description and steps provided.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 536475 Comments
Status Closed Workarounds
Type Bug Repros 23
Opened 2/25/2010 11:02:14 AM
Access Restriction Public


I have a solution with multiple projects including one with unit tests. If I start debugging the unit tests in the solution (Test -> Debug -> All test in a solution), the starting of the test first fails with an error "Unable to start program 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe'". The second time I start the debugging, it works. Third time fails again, fourth time works, etc. etc. This also results in multiple (dozens at lest) QTAgent32.exe processes running.
Sign in to post a comment.
Posted by Igby Dalziel on 11/10/2011 at 8:22 AM
I had this problem too. I had a few WCF service projects in my solution, and Emil Macarie's workaround (removing WCF tags from csproj files) worked for me. Thanks Emil!
Posted by bojingo on 6/2/2011 at 1:32 PM
Since this one was closed as Not Reproducible (prematurely, as with the the additional info provided here it shouldn't be difficult for them to repro), I found one that is still active and provides some other information as well.

Posted by MatthieuKlotz on 5/16/2011 at 12:57 AM
Same probleme here. I have the following error in my event viewer :

The description for Event ID 0 from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

(devenv.exe, PID 368, Thread 1) HierarchyOutputCollection.GetOutputGroup: either buildManager.FindActiveProjectCfg or projectCfg[0].OpenOutputGroup failed: System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at Microsoft.VisualStudio.TestTools.Vsip.HierarchyOutputCollection.GetOutputGroup(IServiceProvider serviceProvider, IVsHierarchy hierarchy)

the message resource is present but the message is not found in the string/message table
Posted by Raul Rangel on 3/18/2011 at 1:05 PM
I also get the following in my event viewer:

Event Type:    Error
Event Source:    VSTTExecution
Event Category:    None
Event ID:    0
Date:        3/18/2011
Time:        1:58:30 PM
User:        N/A
Computer:    CO1801GRXRANGE
The description for Event ID ( 0 ) in Source ( VSTTExecution ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: (devenv.exe, PID 3340, Thread 47) Local ControllerProxy.PrepareQueueTestRunWorker: error (ignored): System.Runtime.InteropServices.COMException (0x89710016): Unable to start program 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe'.

at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.PrepareProcess(TestRun run)
at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.InitializeController(TestRun run).
Posted by Leroy Kussy on 1/31/2011 at 2:35 AM
This issue should be reopened indeed. I can also reproduce this problem. Not sure what's causing this yet though, but I do have multiple instances of VS2010 open most of the time.

There also seems to be an application event log entry every time this happens:

Log Name:     Application
Source:        VSTTExecution
Date:         31-1-2011 11:21:03
Event ID:     0
Task Category: None
Level:         Error
Keywords:     Classic
User:         N/A

The following information was included with the event:
(devenv.exe, PID 3288, Thread 37) ControllerProxy: Queue test run error: System.Runtime.InteropServices.COMException (0x89710016): Unable to start program 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe'.

at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at Microsoft.VisualStudio.TestTools.TestCaseManagement.UIThreadInvoker.Invoke(Delegate method, Object[] args)
at Microsoft.VisualStudio.TestTools.TestCaseManagement.SolutionIntegrationManager.DebugTarget(DebugInfo debugInfo, Boolean prepareEnvironment)
at Microsoft.VisualStudio.TestTools.Agent.DebugProcessLauncher.Launch(String exeFileName, String args, String workingDir, IEnumerable`1 environmentVariables, EventHandler processExitedHandler, Process& process)
at Microsoft.VisualStudio.TestTools.Agent.OutOfProcessStrategy.LaunchProcessHelper(AgentProcessStartupInfo agentProcessStartupInfo)
at Microsoft.VisualStudio.TestTools.Agent.OutOfProcessStrategy.StartAgentProcess(AgentProcessStartupInfo agentProcessStartupInfo, Boolean restarting)
at Microsoft.VisualStudio.TestTools.Agent.OutOfProcessStrategy.StartAgentProcess(AgentProcessStartupInfo agentProcessStartupInfo)
at Microsoft.VisualStudio.TestTools.Agent.AgentProxy.StartAgentProcess(AgentProcessStartupInfo agentProcessStartupInfo)
at Microsoft.VisualStudio.TestTools.Agent.AgentProcessProxyManager.StartTestAgentProcesses(AgentProcessStartupInfo agentProcessStartupInfo)
at Microsoft.VisualStudio.TestTools.Agent.AgentProcessManager.StartAgentProcess(AgentProcessStartupInfo agentProcessStartupInfo, Boolean startDataCollectionAgent)
at Microsoft.VisualStudio.TestTools.Agent.AgentProcessManager.StartAgentProcess(AgentProcessStartupInfo agentProcessStartupInfo, TestRunConfiguration testRunConfiguration)
at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.StartProcess(TestRun run)
at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.PrepareProcess(TestRun run)
at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.InitializeController(TestRun run)
at Microsoft.VisualStudio.TestTools.TestManagement.ControllerProxy.QueueTestRunWorker(Object state)
Posted by Emil Macarie on 1/28/2011 at 4:57 PM
I agree with dfgffgfghfghfghfghfgh in the sense that it looks like there is some sort of timeout. I posted a workaround for my particular problem, but I am not sure if it applies to everyone.
Some sort of option to set how long to wait for QTAgent32 to start would be nice.
Posted by Lawrence Parker on 10/28/2010 at 1:04 PM
I am running into the exact same problem. Very annoying! I'm running on Windows XP (under VMware).
Posted by hype9 on 10/7/2010 at 7:48 AM
I have exactly the same problem. I have also a Win 7 64 bit System. There also many QTAgent32 processes are running.
If I open a second Visual Studio, it works perfectly on each test start on the second Studio.
I don't know why it doesn't work in the first instance.
Please reopen this thread, this behavior is very annoying.

I test a Webservice project, but with normal Unit tests.
public void Test()
     //do test
Posted by Nick Nightingale on 10/7/2010 at 5:24 AM
Exactly the same problem for me win Win 7 x64
Works every second time and leaves lots of QTAgent32 processes running
Posted by EllioKiller on 9/24/2010 at 12:13 AM
New info : Occurs mostly when more than one VS2010 is open (resource allocation problem ?)
Posted by EllioKiller on 9/24/2010 at 12:00 AM
It's really easy to reproduce it if your target project (the assembly you're testing) is a wcf service library.

Please reopen this thread asap.
Posted by lothar777 on 9/4/2010 at 2:45 AM
Have the same problem. The vs solution has about 40 projects. Every second time I run unit tests in debug it happens. It seems as if vs2010 doesnt wait long enough for QTAgent to start or something.
Posted by James Ogden on 8/23/2010 at 1:25 PM
Also 100% reproducible. Also Win7 x64
Posted by Kevin Ortman on 8/14/2010 at 8:04 AM
Same. Win7 x64 100% reproducable.
Posted by Shaun P Bowe on 6/14/2010 at 10:59 AM
I can also reproduce this bug. It seems the common thread is Windows 7 64-bit.
Posted by Chuck Berg - Station Casinos on 4/15/2010 at 3:20 PM
I too can reproduce the problem repeatedly, on Windows 7, x64, with RC1.
Posted by Kestas.Cerniauskas on 4/10/2010 at 3:20 AM
I can reproduce this bug too.

I am running VS 2010 RC1 on Windows 7 x64 machine.
My unit-test project behaves exactly as described by jhaakana, every second time tests fails (in debug Tests/All in Current contex mode). Run all tests run just fine.
Posted by Microsoft on 3/3/2010 at 4:36 PM

We cannot reproduce this issue with the steps provided. Since we haven't heard back from you with more information or a project, we will be closing this issue.

Visual Studio Product Team
Posted by Microsoft on 2/26/2010 at 1:08 AM
Thanks for reporting this issue. In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

Please give us a demo project to demonstrate this issue so that we can conduct further research.

It would be greatly appreciated if you could provide us with that information as quickly as possible. If we do not hear back from you within 3 days, we will close this issue.

Thanks again for your efforts and we look forward to hearing from you.

Visual Studio Product Team
Posted by Microsoft on 2/25/2010 at 7:04 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(