Home > .Net, TFS > TFS build Sservice account change gives workspace in use error

TFS build Sservice account change gives workspace in use error

When we changed the existing service account we were using for TFS build agent and used a new service account. After this change our continous integration failed with the following error:

C:\Program Files\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(699,5,699,5): error : The working folder [WorkingFolder] is already in use by the workspace [workspace];[domain]\[user] on computer [buildmachine]

Part of the Team Build build process involves creating a workspace that can be used to get sources for the build. This workspace is typically deleted and then created during the course of the build, meaning that after the build the workspace hangs around. So – when you changed the service account, the delete for the next build had nothing to do (since workspaces are owned and the current user didn’t have a workspace to delete) and the create failed, since a workspace already existed in the same location. You’ll just need to delete the old workspace, owned by DEV\tfssetup

I found the above excellent tip from the this page.

And the correct command to execute the deletion of workspace is as follows:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE>tf workspace /delete /server:http://%5Bservername%5D:8080/ [workspacename];[domainname]\[utcode]

You will need workspace deletion permission to execute the above command.

More information here!

Happy programming!

  1. February 5, 2011 at 12:37 am

    With Visual Studio 2010, try the following:

    C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE>tf workspace /delete ”

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: