views:

1776

answers:

4

I have this problem when I queue a build. The build dies with the error

The path C:\[Path]\Sources is already mapped in workspace [Server Name].

the same as this question. but I've removed all the workspaces on the build agent by running this command:

tf workspaces /remove:*

and also by deleting the TFS cache folder. I've also restarted the server, but the error keeps happening on each build.

+3  A: 

Ok, so the solution ended up being fairly similar to what YeahStu posted on here. I changed the Build Agent's working directory from

$(Temp)\UI\$(BuildDefinitionPath)

to

$(Temp)\UI\$(BuildDefinitionPath)\$(BuildDefinitionID)

What is odd is that the other build agent we have is still running in $(Temp)\UI\$(BuildDefinitionPath) and working fine. The only difference between the two agents is the the one that stopped working had Visual Studio 2010 RC installed on it, while the one that's still working has VS2010 Beta2 on it. No idea why this should make a difference.

Glenn Slaven
This helped me. I had installed VS2010 Ultimate (RTM) on the build agent and immediately our builds started failing. Thanks!
Paul
A: 

More info about the working directory property here:

http://msdn.microsoft.com/en-us/library/bb399135.aspx

However, in the RTM version "$(HOMEDRIVE)" isn't recognized. Might be because of the casing; haven't tested it, so be aware of that flaw in the docs.

Will
A: 

I had the same issue - it was running fine until I installed VS2010 on the build agent. Adding the BuildDefinitionId fixed it, but it is strange that installing VS2010 would mess up the workspaces that are already set up and running.

A: 

Thanks worked..

Dilli