Unable to determine workspace after Windows Profile reset

265 Views Asked by At

I'm using Visual Build Pro to run build scripts and build an application. Part of those scripts is getting the latest code from TFS.

All was working fine until my windows profile became corrupted and had to be deleted and recreated. Since then I'm getting "Unable to determine the workspace. You may be able to correct this by running 'tf workspaces /collection:TeamProjectCollectionUrl'" when the scripts try to run the TFS get operations.

The workspace is mapped to C:\Workspace and the build scripts are in that directory tree and the workspace shows up when I run the tf workspaces command. I've tried removing the workspace, remapping it, changing the name, deleting the folder, adding it back, clearing the appData cache etc all to no avail.

Does anyone have any ideas what I'm missing here ?

3

There are 3 best solutions below

0
On BEST ANSWER

I managed to resolve the issue although I'm not 100% sure what in particular actually did it or whether it was a combination of things.

The steps I took were:

  • Uninstalled and reinstalled Visual Build Pro.
  • Refreshed the cache using the command: tf workspaces /s:http://tfs-server:8080.
  • Ensured the work-space name was the same as the machine name.
  • Ensured the folder name used the same case as what was specified in the workspace configuration and the commands being used.
  • Ran the Get command from the command prompt (which worked without issue from the user directory using the absolute path to tf.exe).

Somewhere along the line while following those steps the issue was resolved.

1
On

When you tf get is being run outside of your workspace directory, you'll get this error. Try to CD to the directory that contains the workspace that you need to work with first. For example:

cd c:\sources\myteamproject

tf get ...
0
On

Use the corresponding developer command prompt and refreshed the cache using the command: tf workspaces /s:http://tfs-server:8080

I had multiple Visual Studio, namely 2012 and 2010 and Visual build 7. So I had to refresh the cache using developer command prompt for 2010.