Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deleting a folder in TFS

I created a folder in a TFS Project under workspace "CPortalWS". I deleted the workspace, but now I would like to delete the folder in the project and the delete option is not available.

I've tried to create a new workspace mapped to the project but I still don't get the option to delete.

Is this a bug in TFS? How can I delete the folder?

Any help would be appreciated.

like image 252
Mark Kadlec Avatar asked Apr 16 '10 19:04

Mark Kadlec


People also ask

How do I delete a folder in source control?

To remove files from source control:choose Source Control > Remove or press Ctrl+R, R. The dialog will list the files that can be removed. In that dialog, you can deselect any files you don't want to remove. Click Remove.

How do I delete a folder in Visual Studio?

In the Workspace Explorer, right click on the folder you wish to remove and select "Remove Folder from Workspace" from the the popup menu.


2 Answers

Deleting a folder in TFS is a little strange.

You have to:

  • Create a Workspace

  • Get the latest source for the folder (to your local machine)

  • Inside Source Explorer, delete the folder

  • Check in your changes (this is the step that deletes the folder in Source Control)

like image 176
Justin Niessner Avatar answered Sep 17 '22 13:09

Justin Niessner


only note that delete is not an actual delete. the folders/files are still there and kept in Version Control, for example for Undelete scenarios. You can see them and avail the undelete function if you go to "Tools > Options > Source Control > Visual Studio Team Foundation Server" and check "Show deleted items in the Source Control Explorer" and then right-click on one of the deleted folders.

so, if you want real delete, where the folder/files actually go away you need to use the Destroy Command which is only available from the command line, see link below

http://msdn.microsoft.com/en-us/library/bb386005.aspx

like image 43
undertakeror Avatar answered Sep 21 '22 13:09

undertakeror