Before stressing out: TFS cache folder on build server

stressed out worker

Sometimes build fails on your TFS build server. This can happen because you have deleted a build defenition and created a new one with the same name. Even over some time you can get the error: ‘Unable to create the workspace due to a mapping conflict’.

On your own machine you can just open Visual Studio and remove the workspace. But when your build server has his own user to run the builds. Then this trick doesn’t work anymore. This is really going to be a issue if you can’t login with that account.

When this happens it is nice that there is always a backdoor. When things like this happen you can just go to the cache of the TFS for that user. You can easily do that by going to the folder in: ‘{userprofile}\AppData\Local\Microsoft\Team Foundation\{version}\Cache’.

In this folder there is a folder called ‘Volatile’. In a sub folder of this Volatile folder you will find the file VersionControl.config. In this file you find the mappings. Delete all the mappings for the build that goes wrong. Then go back to the cache folder at  ‘{userprofile}\AppData\Local\Microsoft\Team Foundation\{version}\Cache’ and delete the folders with a GUID as name.

Now queue a new build and you will see that your build will work again. I hope that this prevents you from hours of searching for a solution.


Leave a Reply

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

You are commenting using your 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