Wednesday, November 15, 2006

TFS Build Troubleshooting

Team Build TF42046: The Build Service used in the build process is not reachable

Whenever you get above error, plz make sure following:

  1. That Team Build is installed on the build machine. This can be found on the Team Foundation Server installation CD in the BB directory. Run setup to install Team Build
  2. Make sure the Team Build Service is running. Open the services MMC snapin and look for Team Build Service. Make sure the service is running. Also note the account that the service runs as; you will need it for the next step
  3. Make sure the Team Build Service account (from step 2) is in the “TFS Service Accounts” group. For more information see
  4. Make sure the designated Team Build port is listening and available thru any firewalls. By default, the port used is 9191. Open a command prompt on the build machine and run “netstat”. Make sure TCP port 9191 is listening. You may want to make sure The Team Build service has this port and not another application on the build server. Make sure this port is not blocked by the window’s firewall or any other firewall in you enterprise.
  5. Make sure the paths defined in your PATH system variable do not have any invalid characters. This includes any “” around the paths. Part of the Team Foundation Build Client source code attempts to build the path to msbuild.exe using the paths defined in this environment variable. Unfortunately the exception that is thrown when the system attempt to call Path.Combine on a malformed path is masked by the misdirecting TF42046 error.
  6. If all else fails, turn on verbose tracing by navigating to the build server’s build service install directory and uncomment the trace flags in the TeamBuildService.exe.config file. You can find this file at “:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\”. You can verify this directory by checking the run directory listed in the properties window of the TeamBuildService found in the services snapin.