Error TF400324 when starting the Visual Studio Test Controller

I recently had a problem starting the Test Controller Configuration Tool. There was no error, but it simply hung on the loading state. A quick look at the event log showed three errors. The most important one was:
The Controller service could not be started. TF400324: Team Foundation services are not available from server: [redacted URL]

The URL was referring to an old team project collection. I actually wanted to use the Configuration Tool to change this URL.

Since I could not attach the controller to another collection by using the Configuration Tool, I started to look around to find where the configuration itself was stored. The answer is an XML file named QTControllerConfig.xml located in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE.
I opened the file, replaced the content with this:
<?xml version="1.0" encoding="UTF-8"?>
<ControllerConfiguration xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010/QTControllerConfig.xsd">
  <TestEnvironments>
    <TestEnvironment name="Default" id="8869bc36-5a69-4901-b46a-a38dfbd2ed06">
      <Description>Default Test Environment</Description>
      <MachineRoles>
        <MachineRole name="Default" id="dc134fe8-3c53-42e4-bcc1-6f2392e2fb8c" />
      </MachineRoles>
    </TestEnvironment>
  </TestEnvironments>
  <Properties>
    <Property name="MaxAgentVersionOnController" value="11.0.60610" />
  </Properties>
</ControllerConfiguration>
After that, I tried to open the Configuration Tool again and it worked.

For the record, updating the URL to the intended one did not work because the test controller itself was not yet registered.

Popular posts from this blog

Handling exceptions the right way in WCF (part 2)

Adding a delay before processing Textbox events

Change the deployment URL of a ClickOnce application