← Tutti gli articoli

Visual Studio 2010 ( VS2010) - TEAM FOUNDATION SERVER TFS 2010 - The path . is already mapped in workspace .

19 febbraio 2011  · TFS 2010 · Article  ·  1339 visite

I have installed Visual Studio 2010 and also the VS 2010 TFS client and am connected to my TFS server. When I try to Map (in VS2010) my local folder to my Projects in TFS 2010 I have the following error message: "The Path … is already mapped in workspace ... "

You can use the tf utility in Visual Studio Command Prompt:
 
List all the workspaces:
  1. C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC > tf workspaces /owner:giovanni  
 
Collection: maragna.net\DefaultCollection
Workspace Owner    Computer Comment
--------- -------- -------- ---------------------------------------------------
GM        giovanni GM
GM7       giovanni GM7
GMHP      giovanni GMHP
GMXPMODE  giovanni GMXPMODE
 
 
Delete the workspace:
  1. tf workspace /delete gm7;giovanni  
or
 
Delete the workspace with the default collection:
  1. C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC > tf workspace /delete gm7;  
  2. administrator /collection:http://192.168.1.242:8080/tfs/defaultcollection  
  3. A deleted workspace cannot be recovered.  
  4. Workspace 'gm7;administrator' on server 'http://192.168.1.242:8080/tfs/defaultco  
  5. llection' has 0 pending change(s).  
  6. Are you sure you want to delete the workspace? (Yes/No) y  
 
If you have removed or chaged your TFS Server remember to modify the file VersionControl.config located in:
C:\Users\giovanni.MARAGNA\AppData\Local\Microsoft\Team Foundation\3.0\Cache.
 
For instance I removed my Tfs Server (gmsrv).
 
When I attempt to map my local folder c:\DevProjects\Adfin to the new TFS Server I have the following error message:
 
 
I have to delete the section:
<ServerInfo uri="http://gmsrv:8080/tfs/defaultcollection in my VersionControl.config
  1. < VersionControlServer >   
  2.   <Servers>  
  3.     <ServerInfo uri="http://gmsrv:8080/tfs/defaultcollection" repositoryGuid="bec6f4a0-1c4d-4bd2-bc3b-c6b90ceb1fad">  
  4.       <WorkspaceInfo name="GM7" ownerName="MARAGNA\giovanni" computer="GM7" comment="" LastSavedCheckinTimeStamp="2011-04-16T17:04:51.8131293Z">  
  5.         <MappedPaths>  
  6.           <MappedPath path="E:\DevProjects\Adfin" />  
  7.           <MappedPath path="E:\DevProjects\BestHorses.Com" />  
  8.           <MappedPath path="E:\DevProjects\BestHorses.It" />  
  9.           <MappedPath path="E:\DevProjects\Maragna.Net" />  
  10.           <MappedPath path="E:\DevProjects\Other" />  
  11.         </MappedPaths>  
  12.         <LastSavedCheckin>  
  13.           <SavedCheckin>  
  14.             <Comment>  
  15.             </Comment>  
  16.             <PolicyOverrideComment>  
  17.             </PolicyOverrideComment>  
  18.             <SelectedItems>  
  19.               <Item serverItem="$/MaragnaNet/Main/Source/MaragnaNet/MaragnaNet/MaragnaNet.csproj.user" itemId="11793" />  
  20.               <Item serverItem="$/MaragnaNet/Main/Source/MaragnaNet/MaragnaNet/MaragnaNet.Publish.xml" itemId="11795" />  
  21.               <Item serverItem="$/MaragnaNet/Main/Source/MaragnaNet/MaragnaNet/bin/cuteeditor.lic" itemId="12813" />  
  22.               <Item serverItem="$/MaragnaNet/Main/Source/MaragnaNet/MaragnaNet/bin/bin/cuteeditor.lic" itemId="12824" />  
  23.               <Item serverItem="$/MaragnaNet/Main/Source/MaragnaNetDB/MaragnaNetDB/Schema Objects/Schemas/dbo/Tables/YouTubeVideo.table.sql" itemId="17392" />  
  24.               <Item serverItem="$/MaragnaNet/Main/Source/SharedSource/Google Data API SDK/Sources/Library/core/service.cs" itemId="18351" />  
  25.             </SelectedItems>  
  26.           </SavedCheckin>  
  27.         </LastSavedCheckin>  
  28.       </WorkspaceInfo>  
  29.     </ServerInfo>  
  30.     <ServerInfo uri="http://newServer/tfs/defaultcollection" repositoryGuid="50318bd8-81de-45f1-98c9-bc9e7bdfa6ee">  
  31.       <WorkspaceInfo name="GM7" ownerName="WIN-R76S4O27LJL\Administrator" computer="GM7" comment="" LastSavedCheckinTimeStamp="0001-01-01T00:00:00Z">  
  32.         <MappedPaths>  
  33.           <MappedPath path="E:\DevProjects\MaragnaNet" />  
  34.         </MappedPaths>  
  35.       </WorkspaceInfo>  
  36.     </ServerInfo>  
  37.   </Servers>  
  38. </ VersionControlServer >   

Supplementary actions:

  • Disconnect TFS Server in VS2010
  • Close VS2010
  • Open VS2010
  • Connect TFS Server in VS2010
For more information about the use of the tf utility see: