How does TFPT.exe find what workspace to work in?

TheSean picture TheSean · Nov 18, 2009 · Viewed 37.3k times · Source

In using tfpt from the command, I'm getting the error:

PS D:\Main Line> tfpt uu /noget
Unable to determine the workspace.

Here I'm trying to use the Undo Unchanged command, but I've seen this error with other commands too. The path I'm at is the exact path that is mapped in my TFS workspace. I also tried this which doesn't work either

PS D:\Main Line> tfpt uu /recursive /noget 'D:\Main Line'
Unable to determine the workspace.

I thought it was just using the current path to figure it out, but I can't get it to work right. Does anyone know how this works?

Answer

BFoust picture BFoust · Jan 8, 2010

I ran into this same issue, I found the answer at the bottom of the page in one of the help files that came with The power tools. (TFPTCommandLineTool.mht)

Errors

TFPT Error: Unable to determine the workspace

When running tfpt using a command that works with Version Control, you may receive one of the errors:

Unable to determine the workspace 
Unable to determine the source control server

Solutions:

  • Run tfpt.exe from within a directory that is already mapped to Team Foundation source control.
  • Update your local workspace cache using the tf workspaces command. The tf.exe tool is available in the subfolder Common7\IDE of your Visual Studio installation folder. If you launch a Visual Studio command prompt, you can then run the following command (which depends on your versions of TFS/VisualStudio - you should use the version that matches version of TFPT you are using, e.g. if you have TFPT for VS2015, use TF from a VS2015 command prompt):
    • VS 2008-2013 / TFS 2008:
      • tf workspaces /s:serverURL
    • VS 2010-2013 / TFS 2010 (and probably later versions as well):
      • tf workspaces /collection:collectionURL
    • VS 2008 / TFS 2010 (and probably later versions as well):
      • tf workspaces /s:collectionURL
  • If you have recently installed Visual Studio 2012, you might have to connect it to the same TFS server/collection you were using in Visual Studio 2010.