6

It's been asked a lot, and for 2 days, I've tried to resolve, with no success. I am running TFS 2012 Express, on Win7. I have installed VS Express edition on that machine. I can check in fine. I am trying to set up a Continuous Integration build.

But, when I force a build on the build server, I get the following error:

Unable to create the workspace '2_1_Server' due to a mapping conflict. You may need to manually delete an old workspace. You can get a list of workspaces on a computer with the command 'tf workspaces /computer:%COMPUTERNAME%'.

Details: The path C:\Builds\Finance is already mapped in workspace 1_1_Server. (type MappingConflictException)

(Not sure where it gets "C:\Builds\Finance" from....)

I then try what it says on my dev machine, and it asks me for my login credentials on the build server. I enter them, and it tells me:

enter image description here

That seems fine, no?

On the server, I check my Build Agent working folder:

d:\Builds\$(BuildAgentId)\$(BuildDefinitionPath)

I am not sure where the conflict is.

Interesting, if I load a different team project on the same server, it builds. I just created a build definition for this project, and it seemed to build successfully. I think it has something to do with the Build Definitions, as these projects were moved from another TFS server.....

Can anyone assist?

Dylan Smith
  • 22,069
  • 2
  • 47
  • 62
Craig
  • 18,074
  • 38
  • 147
  • 248

1 Answers1

13

Install the free tool Team Foundation Sidekicks, and use it to delete any workspaces for your build server via Tools > Workspace Sidekick (i.e. with your build server's name in the workspace search result's Computer column). (Don't worry; TFS builds will recreate them):

Then go and delete everything under d:\builds on the build server.

Then check the workspace mapping by editing each build def under its Source Settings tab, and ensure they are using $(SourceDir) as part of the path for every mapping defined.

If the builds have the paths hardcoded instead of using the $(SourceDir) token as the root, it might explain the behavior you are seeing.

J0e3gan
  • 8,740
  • 10
  • 53
  • 80
Dylan Smith
  • 22,069
  • 2
  • 47
  • 62
  • 1
    Give Sidekicks a blank "Owner name" to search for all owners. My owner name wound up being "TFS2012 Service" for the workspace that needed to be deleted. – Micah B. Mar 04 '14 at 16:13