I had a project in tfs within a team project then we moved the project to a different location in another team project.
I had configured Jenkins to connect to the te
I managed to remove the mapping using the /newowner command as suggested here:
How can I regain access to my Team Foundation Server Workspace?
The command opened an Edit Workspace windows where I removed the mapping. Afterwards I deleted the workspace I didn't need.
You don't have to delete the entire Cache folder. you lose all settings / preferences The workspace mappings are stored in a file called:
VersionControl.config under the users local settings/application data directory. located here in windows 7:
%LocalAppData%\Microsoft\Team Foundation\x.0\Cache\Volatile
where x= 3.0,4.0, 5.0,6.0 etc.
Inside this you will find guid named folders , open each of them, manually editing the forementioned file, to remove the workspace mapping(directory path will be present in mappedpaths attribute) from that local folder to the TFS server (which is no longer in usage).
You can also remove a tfs mapping by simply editing your .sln file and removing the GlobalSection element for the tfs binding.
Update 2019-01-23
If you’re repeatedly getting the following error The workspace wkspaceEg does not exist…
even after employing the correct username (wkspcOwnerDomain\wkspcOwnerUsername
) in the tf workspace
command, e.g.,
tf workspace "wkspaceEg;wkspcOwnerDomain\wkspcOwnerUsername" /collection:http://tfs.example.com:8080/tfs/collectionEg /login:TFSUsername,TFSPassword
then the tf workfold
command may help fix it. See this question.
If even that doesn’t work and you’re unable/unwilling to use TFS Sidekicks, proceed to the risky last-ditch option below.
I’m using TFS 2012. I tried everything that was suggested online: deleted cache folder, used the workspaces dropdown, tf workspaces /remove:*, cleared credentials from Control Panel, IE, etc.
Nothing worked, I believe my workspace got corrupted somehow. Finally, I went to the TFS database and ran the following queries. That worked! Of course be very careful when messing with the database, take backups, etc.
The database is called Tfs_<<your_TFS_collection_name>>
. Ignore the Tfs_Configuration
MSSQL database. I'm not sure but if you don't have a Tfs_<<your_TFS_collection_name>>
database, settings might be in the Tfs_DefaultCollection
database. Mapping is stored in tbl_WorkingFolder.LocalItem
.
/*Find correct workspace*/
SELECT WorkspaceId, *
FROM tbl_Workspace
ORDER BY WorkspaceName
/*View the existing mapping*/
SELECT LocalItem, *
FROM tbl_WorkingFolder
WHERE WorkspaceId = <<WorkspaceId from above>>
/*Update mapping*/
UPDATE tbl_WorkingFolder
SET LocalItem = 'D:\Legacy.00\TFS\Source\Workspaces\teamProjEg' WHERE
/*LocalItem = NULL might work too but I haven't tried it*/
WorkspaceId = <<WorkspaceId from above>>
Please follow the below steps:
Ctrl + Run
Copy and Past
%LocalAppData%\Microsoft\Team Foundation
You will get different version of TFS e.g
Click on each folder and you will get
Now Delete all data in these folder.
Reopen the Visual studio.
Thanks.
Run tf workspaces
to view current workspace mappings. Output looks like:
Then run tf workspace /delete "{workspace};{user}
Using output above, to delete workspace bi
:
tf workspace /delete bi;James Wierzba