Search code examples
c#windowsvisual-studiotfsvisual-build-professional

Unable to determine workspace after Windows Profile reset


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 ?


Solution

  • 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.