views:

1172

answers:

4

We're using Visual Studio 2008/TFS 2008.

We have a small team of developers and for some reason, periodically, when any of us "Get Latest," one of our paths remaps to a different path on it's own. This causes the "Get Latest" to start deleting files, because the path has changed. It's the same path every time that gets remapped to the wrong path.

  1. Where are workspace definitions stored?
  2. Is there something we may have checked into TFS that's causing this?
A: 

The Workspace definitions are stored on the server.

If you go to the command line and type "tf workspace", you will see the definition of your workspace.

Yea, I can modify my workspaces. But, when I look at my workspace after the get operation, the path is changed.
+1  A: 

This is not normal behavior - sounds like something is going funny. Just wanted to check - all you are doing is simple get's from Source Control explorer correct? Also - all of you are on different machines? (I.e. you are not sharing a virtual PC image or anything where multiple machines have the same name)

One think I would check is to go to File, Source Control, Manage Workspaces and look at your working folder mappings both before and after the get and see if anything is changing. It shouldn't - if it does this might give us a clue as to what is happening.

Martin Woodward
+1  A: 

You can also try clearing your workspace cache and remap it:

SET AppDataTF=%USERPROFILE%\Local Settings\Application Data\Microsoft\Team Foundation
SET AppDataVS=%APPDATA%\Microsoft\VisualStudio
IF EXIST "%AppDataTF%\1.0\Cache" rd /s /q "%AppDataTF%\1.0\Cache" > NUL
IF EXIST "%AppDataTF%\2.0\Cache" rd /s /q "%AppDataTF%\2.0\Cache" > NUL
IF EXIST "%AppDataVS%\8.0\Team Explorer" rd /s /q "%AppDataVS%\8.0\Team Explorer" > NUL
IF EXIST "%AppDataVS%\9.0\Team Explorer" rd /s /q "%AppDataVS%\9.0\Team Explorer" > NUL
SomeMiscGuy
This worked for me when the mappings started acting up on one workstation, while working fine on another.
driis
A: 

I have had this happen when I get while opening a solution. If the solution contains relative paths to other projects not under it's folder, that are mapped differently in your workspace, the GET will tell me it's remapping to account for it. Problem is the decisions that it makes are completely wrong.

The only way around it was to ensure that all developers use the same structure that sourcec control uses and havev that represented in each workspace.

Getting there was a pain though. basicly everyone had to delete all local copies of all files, redo workspace, CHOOSE NO TO 'GET' WHEN WORKSPACE CHANGED, close VS, open, GET LATEST.

The reason for that was if copies of projects exsisted local, even if those projects were NOT open, the GET would still be wrong. This was frustrating, because when checking for differences in those projects with latest there was no change, but when opening the solution that contained that project, dll references in that project would auto change. At that moment, no changes are pending on ANY file. But after building the changes would persist and cause the next get to be off again...

I'm sure this is all wrong, but that's what happened to us this week.