Team Build: The path 'Path' is already mapped in workspace 'workspace' error even after deleting all workspaces on build agent

Glenn Slaven picture Glenn Slaven · Feb 24, 2010 · Viewed 28.1k times · Source

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.

Answer

Glenn Slaven picture Glenn Slaven · Feb 26, 2010

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.