"Unable to determine the workspace" Error when using TFS command line TF.exe utility.

by Guillermo 13. March 2008 12:30

I was made aware of this error, after some coworkers used a very simple batch file I put together that leveraged the tf.exe command line TFS tool, to do something as simple as check out a known set of files and check them back in after doing some required processing, all in one step.

Before I put together the batch file, this was a very tedious process as you can imagine... checking out a number of files each from a different location, work on them, and then check them back in... a LOT of mouse clicks.  The batch file was the obvious solution... but I digress...

The error was encountered by some using the file, and it appears to be an issue when one has multiple TFS WORKSPACEs setup, and/or the cache is out of date/sync.

The solution is a combination of steps:

1) If at all possible remove the duplicate WORKSPACE, and keep one, especially if like in this case the duplicate WORKSPACE was identical to the other as a result of these developers getting a new box.

2) If you don't have duplicate WORKSPACES or you have more than one WORKSPACE that you need defined, then it maybe that your TFS WORKSPACE cache needs to be refreshed.  To do so, run the following line at the command prompt: 

c:\>tf.exe workspaces /s:<server URL> 

Where the <server URL> is the URL to your TFS server. 

I haven't and probably won't try to reproduce it to confirm, but I've had all positive feedback that this resolves the issue 100% of the time.

Tags: ,

Development | Technology

Comments

Comments are closed

Powered by BlogEngine.NET 1.5.0.7
Theme by Extensive SEO

About the author

Something about the author

Your Most Recent Comments

Comment RSS

Page List