Symptoms

Consider the following scenario:

  • You configure the cleanup script for a test agent in Microsoft Visual Studio 2010.

  • You configure a time-out value for a test in the test settings (.testsettings) file.

  • You run the test.

  • A time-out occurs when the cleanup script runs, and the test agent cancels the cleanup operation.

In this scenario, the test agent stops running test jobs. Additionally, you receive the following error message:

(QTAgentService.exe, PID '<process id>', Thread '<thread id>') AgentService: Exception while calling QueueTests on agent object: System.InvalidOperationException: Operation is not valid due to the current state of the object.

Cause

This issue occurs because the test agent process (Qtagent.exe) remains in an invalid state.

Resolution

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:

http://support.microsoft.com/contactus/?ws=supportNote In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

To apply this hotfix, you must have Microsoft Visual Studio 2010 Service Pack 1 (SP1) installed.

Restart requirement

You do not have to restart the computer after you install the hotfix if the affected files are not being used at the time of installation. We recommend that you close all Visual Studio 2010-related components before you install the hotfix.

File information

The global version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

File name

File version

File size

Date

Time

Platform

Codeduitestbuilder.exe

10.0.40219.420

76,912

13-Sep-2012

22:06

x86

Qtcontroller.exe.config

Not applicable

5,505

23-Jul-2012

23:13

Not applicable

Leviewer.exe

10.0.40219.420

118,368

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.build.client.dll

10.0.40219.420

436,376

12-Sep-2012

7:20

x86

Microsoft.teamfoundation.build.controls.dll

10.0.40219.420

1,365,144

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.client.dll

10.0.40219.420

1,595,528

12-Sep-2012

7:20

x86

Microsoft.teamfoundation.common.dll

10.0.40219.420

525,448

12-Sep-2012

7:20

x86

Microsoft.teamfoundation.common.library.dll

10.0.40219.420

335,000

12-Sep-2012

7:20

x86

Microsoft.teamfoundation.controls.dll

10.0.40219.420

938,640

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.dll

10.0.40219.420

675,456

12-Sep-2012

7:20

x86

Microsoft.teamfoundation.lab.activities.dll

10.0.40219.420

772,760

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.lab.client.dll

10.0.40219.420

153,232

12-Sep-2012

7:20

x86

Microsoft.teamfoundation.lab.uiutils.dll

10.0.40219.420

266,904

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.lab.workflow.activities.dll

10.0.40219.420

440,496

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.officeintegration.common.dll

10.0.40219.420

375,984

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.officeintegration.project.dll

10.0.40219.420

517,296

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.sync.mapping.dll

10.0.40219.420

72,344

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.sync.provisioning.dll

10.0.40219.420

194,208

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.testmanagement.activities.common.dll

10.0.40219.420

315,072

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.testmanagement.activities.dll

10.0.40219.420

1,512,112

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.testmanagement.activityruntime.dll

10.0.40219.420

219,840

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.testmanagement.client.dll

10.0.40219.420

685,224

12-Sep-2012

7:20

x86

Microsoft.teamfoundation.testmanagement.client.themes.dll

10.0.40219.420

3,059,384

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.testmanagement.client.wpfcontrols.dll

10.0.40219.420

257,736

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.testmanagement.clientpackage.dll

10.0.40219.420

73,912

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.testmanagement.common.dll

10.0.40219.420

34,472

12-Sep-2012

7:20

x86

Microsoft.teamfoundation.testmanagement.controller.dll

10.0.40219.420

121,008

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.testmanagement.controls.dll

10.0.40219.420

496,304

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.testmanagement.controls.wpfworkitemcontrols.dll

10.0.40219.420

100,056

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.versioncontrol.client.dll

10.0.40219.420

706,216

12-Sep-2012

7:20

x86

Microsoft.teamfoundation.versioncontrol.common.dll

10.0.40219.420

233,128

12-Sep-2012

7:20

x86

Microsoft.teamfoundation.versioncontrol.controls.dll

10.0.40219.420

4,439,216

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.workitemtracking.client.dll

10.0.40219.420

699,056

12-Sep-2012

7:20

x86

Microsoft.teamfoundation.workitemtracking.controls.dll

10.0.40219.420

1,215,152

13-Sep-2012

22:06

x86

Microsoft.teamfoundation.workitemtracking.proxy.dll

10.0.40219.420

390,832

12-Sep-2012

7:20

x86

Microsoft.visualstudio.coverage.analysis.4.0.dll

10.0.40219.420

147,624

13-Sep-2012

22:06

x86

Microsoft.visualstudio.coverage.analysis.dll

10.0.40219.420

143,008

13-Sep-2012

22:06

x86

Microsoft.visualstudio.coverage.interop

10.0.40219.420

553,624

13-Sep-2012

22:06

x86

Microsoft.visualstudio.qualitytools.agentobject.dll

10.0.40219.420

106,672

13-Sep-2012

22:06

x86

Microsoft.visualstudio.qualitytools.agentprocessmanager.dll

10.0.40219.420

104,640

13-Sep-2012

22:06

x86

Microsoft.visualstudio.qualitytools.codecoverage.dll

10.0.40219.420

146,096

13-Sep-2012

22:06

x86

Microsoft.visualstudio.qualitytools.common.dll

10.0.40219.420

1,355,424

13-Sep-2012

22:06

x86

Microsoft.visualstudio.qualitytools.controllerobject.dll

10.0.40219.420

277,688

13-Sep-2012

22:06

x86

Microsoft.visualstudio.qualitytools.datacollectionagentobject.dll

10.0.40219.420

37,072

13-Sep-2012

22:06

x86

Microsoft.visualstudio.qualitytools.executioncommon.dll

10.0.40219.420

482,488

13-Sep-2012

22:06

x86

Microsoft.visualstudio.qualitytools.testcasemanagement.dll

10.0.40219.420

1,280,192

13-Sep-2012

22:06

x86

Microsoft.visualstudio.qualitytools.tmi.dll

10.0.40219.420

398,488

13-Sep-2012

22:06

x86

Microsoft.visualstudio.teamfoundation.build.dll

10.0.40219.420

142,496

13-Sep-2012

22:06

x86

Microsoft.visualstudio.teamfoundation.dll

10.0.40219.420

93,848

13-Sep-2012

22:06

x86

Microsoft.visualstudio.teamfoundation.teamexplorer.dll

10.0.40219.420

799,920

13-Sep-2012

22:06

x86

Microsoft.visualstudio.teamfoundation.versioncontrol.dll

10.0.40219.420

59,072

13-Sep-2012

22:06

x86

Microsoft.visualstudio.teamfoundation.versioncontrol.dll

10.0.40219.420

59,584

13-Sep-2012

22:06

x86

Microsoft.visualstudio.teamfoundation.versioncontrol.dll

10.0.40219.420

61,120

13-Sep-2012

22:06

x86

Microsoft.visualstudio.teamfoundation.versioncontrol.dll

10.0.40219.420

63,680

13-Sep-2012

22:06

x86

Microsoft.visualstudio.teamfoundation.versioncontrol.dll

10.0.40219.420

940,216

13-Sep-2012

22:06

x86

Microsoft.visualstudio.teamfoundation.workitemtracking.dll

10.0.40219.420

460,992

13-Sep-2012

22:06

x86

Microsoft.visualstudio.teamsystem.integration.dll

10.0.40219.420

193,192

13-Sep-2012

22:06

x86

Microsoft.visualstudio.teamsystem.licensing.dll

10.0.40219.420

32,928

13-Sep-2012

22:06

x86

Microsoft.visualstudio.testtools.manualtest.common.dll

10.0.40219.420

813,232

13-Sep-2012

22:06

x86

Microsoft.visualstudio.testtools.uitest.codegeneration.dll

10.0.40219.420

155,840

13-Sep-2012

22:06

x86

Microsoft.visualstudio.testtools.uitest.common.dll

10.0.40219.420

178,344

13-Sep-2012

22:06

x86

Microsoft.visualstudio.testtools.uitest.extension.dll

10.0.40219.420

195,760

13-Sep-2012

22:06

x86

Microsoft.visualstudio.testtools.uitest.extension.ie.communication.interop.dll

10.0.40219.420

119,512

13-Sep-2012

22:06

x86

Microsoft.visualstudio.testtools.uitest.extension.ie.communication.interop.dll

10.0.40219.420

143,064

13-Sep-2012

22:06

x64

Microsoft.visualstudio.testtools.uitest.extension.ie.dll

10.0.40219.420

320,184

13-Sep-2012

22:06

x86

Microsoft.visualstudio.testtools.uitest.extension.ie.eventhelper.dll

10.0.40219.420

82,128

13-Sep-2012

22:06

x86

Microsoft.visualstudio.testtools.uitest.extension.ie64.eventhelper.dll

10.0.40219.420

82,136

13-Sep-2012

22:06

x86

Microsoft.visualstudio.testtools.uitest.extension.uia.dll

10.0.40219.420

110,264

13-Sep-2012

22:06

x86

Microsoft.visualstudio.testtools.uitest.playback.dll

10.0.40219.420

66,224

13-Sep-2012

22:06

x86

Microsoft.visualstudio.testtools.uitest.recorder.dll

10.0.40219.420

233,648

13-Sep-2012

22:06

x86

Microsoft.visualstudio.testtools.uitesting.dll

10.0.40219.420

391,328

13-Sep-2012

22:06

x86

Msdiff.dll

10.0.40219.420

485,464

13-Sep-2012

22:06

x86

Mtm.exe

10.0.40219.420

449,616

13-Sep-2012

22:06

x86

Qtagent.exe

10.0.40219.420

21,592

13-Sep-2012

22:06

x86

Qtagent.exe

10.0.40219.420

21,600

13-Sep-2012

22:06

x86

Qtagent32.exe

10.0.40219.420

21,600

13-Sep-2012

22:06

x86

Qtagent32.exe

10.0.40219.420

21,608

13-Sep-2012

22:06

x86

Qtagentservice.exe

10.0.40219.420

100,456

13-Sep-2012

22:06

x86

Tf.exe

10.0.40219.420

325,712

13-Sep-2012

22:06

x86

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.