Codepunk Logo


Team Foundation Server 2015 Debugging Build Queues

by Michael Szul on tags: team foundation server, technology, azure devops
Enjoy this article? We do it with no ads, no tracking, and no data collection. Feel free to:

Team Foundation Server (TFS), which, until recently, was called Visual Studio Online (VSO) for Microsoft's cloud services (now called Visual Studio Team Services) has always been a powerful team management solution that not many people were comfortable utilizing. It didn't help that the project management portion of the service was left wanting. Just look at the 2013 Kanban boards, and you'll know what I'm talking about. Luckily, TFS 2015 made marked improvements, and although it still lagged behind the VSO offering, 2015 Update 1 seemed to solve even those omissions.

Microsoft has thrown it's full weight behind the cloud-based service--although self-hosted solutions are still supported. Documentation and help, however, are often geared towards the cloud, so self-hosted implementations could run into roadblocks that aren't readily solved.

I recently ran into a problem implementing continuous integration builds that left me stuck for a few weeks before I was able to track everything down. You can read the MSDN forum post to follow the complete scenario (after I finally resorted to those forum), but the basic gist was that with the build also taking place on the TFS server, there are a few considerations that need to be made, and a few areas to check, if you run into problems.

First, make sure Visual Studio 2015 is installed on the TFS server (or the build server, if you have these separate). Second, check the build agent in the TFS settings. Chances are, the default installed one is disabled, and might not be reading the capabilities of the server. That page has a download link to download the agent application. Download it to the server, unzip it, and run the *.cmd file to create a new agent, and install it as a service. Default installation values should be fine.

Theoretically, the agent should be installed and running, and builds that you add to the queue should start. If they do not start, and the log file is showing nothing readily apparent, make sure the Visual Studio Team Foundation Background Job Agent is started in services. This service reads jobs from the database and runs the necessary operations, including many alert emails, check-in processes being placed in team rooms, and of course, builds.

The issue I had was that at some point, the authentication got wiped out for the "Log on as" account that runs the background job agent service. Whether between TFS 2013 and 2015, or 2015 and 2015 Update 1, several of the services that used to be under that account had their "Log on as" changed, while the remaining services, could no longer authenticate. Once the account had its password reentered, and the service was saved, builds started processing normally again.

As a brief aside, I'm sure you noticed that it has been a while since I posted something. I try to post at least one thing a month, but parenting twins is more difficult than one can imagine, which leaves little time for writing. I will try to be more diligent in the future.