Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 552
TheSean Avatar asked Nov 18 '09 19:11

TheSean


People also ask

What is workspace in Azure Devops?

Your workspace is your local copy of the team's codebase. This is where you develop and test your code in isolation until you are ready to check in your work. In most cases the only workspace you need is created automatically for you and you don't have to edit it.

What is TFS workspace?

A "workspace" in TFS defines where the code resides locally. In essence, a workspace is a folder, or multiple folders, mapped to areas in TFS. When code is checked out of TFS, the code is stored locally based off your workspace mappings.


4 Answers

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.
like image 63
BFoust Avatar answered Oct 06 '22 05:10

BFoust


When using tf workspaces /s:serverURL make sure you use the right tf.exe!
I had the same problem and was stuck because I used the tf.exe from:

\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE

and not the one from:

\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE

like image 23
Nitzan Avatar answered Oct 06 '22 03:10

Nitzan


For Visual Studio 2017 users

I had the same problem when trying to run the tfpt command line on a fresh machine installation with VS215 and VS2017 installed. The latest version for the tfpt tool at the time of writing is from TFS Power Tools 2015. That means the local workspace mapping has to be loaded in VS2015 first before the tfpt tool can find the workspace.

Since my team is using VS2017, I only did the workspace mapping in this Visual Studio version. When I opened the VS2017 developer command prompt to use this tool, I got the 'Unable to determine the workspace' message.

To solve this I opened VS2015 and connect the Team Explorer to the TFS server. It immediately recognizes the workspace mapping that was made under VS2017. After this the tfpt tool works correctly under VS2015 and VS2017 developer command prompts.

like image 41
pogosama Avatar answered Oct 06 '22 04:10

pogosama


I tried all of this and still i got the same error. The error is generic enough to represent multiple issues, i guess..

re-installing TFPT from

https://visualstudiogallery.msdn.microsoft.com/f017b10c-02b4-4d6d-9845-58a06545627f

fixed the issue for me.

like image 26
Ravi Sankar Raju Avatar answered Oct 06 '22 04:10

Ravi Sankar Raju