1
votes

I recently setup a new build server for TFS 2015. ON the build agent properties the working dir was originally set to $(SystemDrive)\$(buildnum)\etc I changed it to be hard coded to E:\ for all the build agents.

But it still attempts to check out the code under C:\

I have looked in the build definition, the build template and the config.xml and see no reference to c:\ or $(SystemDrive) anywhere.

Why is it ignoring the working directory and how can I get it to build under E:\

EDIT ------

Ok now that I have looked at it a little more what I think is happening is that it is copying the source to C: first and then moving it to E: to actually run the build. Based on $(SourceDir) and the BuildAgent Working directory. That being said I do not know how to configure the $(SourceDir) value to point it to E:\

We dont have enough space on the C: to be able to pull down multiple project folders before copying them to E:

2
Did you restart the build agents and controller after the change? - Taegost
Yes, then I restarted the entire server. Still builds in C:\ - Overlordchin
If you use TFS Sidekicks, does it still show the workspace mapped to the old path? - Taegost
I had never heard of that app until you mentioned it. I installed it to try but it crashes when I try and run it. OS is windows server 2012. I started looking through the work spaces in visual studio and everyone that I checked was pointed to E:\ but they were all for the old tfs server and probably need to be removed. There are literally hundreds of them. - Overlordchin
Did you install the correct version? You need Version 6, and it also does not need to be installed on the server (I run it locally on my machine) It's an amazing tool, I use it all the time to look at workspaces and it's also really good for undoing checkouts. - Taegost

2 Answers

1
votes

Alright I figured it out. The build logs said they were getting the workspace. When I compared the time it was taking to previous successful builds I noticed that there was a large discrepancy in the time taken. At this point I started looking for files that should have been pulled down and couldnt find any. So I started looking for where all the space was going. What was actually happening is the database was rejecting the connections and filling the drive with sql dumps.

Thanks for all the suggestions guys.

EDIT - After running the service pack and cumulative updates for SQL Server the errors went away. TFS now builds on the appropriate drive and the main system drive no longer fills with SQL dump files.

0
votes

Just changed my build agent Working Directory from $(SystemDrive)\Builds\$(BuildAgentId)\$(BuildDefinitionPath) to E:\Builds\$(BuildAgentId)\$(BuildDefinitionPath), then queued a build, the build agent get sources from TFS to my E: driver. No issue occurred.

You can try to clean the cache file on your TFS AT machine: C:\TfsData\ApplicationTier\_fileCache