McCarson
McCarson

Reputation: 159

Deleting folders in a Solution Folder that remain across a team in TFS after removing them from Solution Explorer

Is there a way to delete web project folders or library folders that have been removed from Solution Explorer (that still remain in the solution folder) when using TFS across a team without manually having to do it?

I'm finding I as well as a team member have to cross-check the solution's folder because these files are still "housed" in the solution folder even if it is removed from the Solution Explorer. (Binding is valid and under source control)

Thanks in advance for the help

Upvotes: 0

Views: 1484

Answers (1)

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30362

Generally you need to check in the changes after deleting the folders/files from Solution Explorer, then other team members get latest version (Right-click --> Get Latest Version) to sync the files with TFS server.

If you are deleting a file from Solution Explorer, the following warning message may appear: will be deleted permanently. The file deletion will not be implemented on the server until you check in this change. If the file was checked in to version control before the delete, then you can recover the file. Choose OK if you want to proceed with deleting the file.

Please see Delete an item for details.

Note that by default the deleted folders/files are marked as deleted (with a X )in Source Control Explorer. To hide deleted items in SCE, please go to Tools->Options->Source Control->Visual Studio Team Foundation Server and unmark "Show deleted items in Source Control Explorer".


UPDATE:

Just try below steps to delete a folder in TFS:

  1. Get the latest source for the folder (Right-click on the folder --> Get Latest Version)
  2. Delete the folder from Source Control Explorer or Solution Explorer
  3. Check in your changes (If that still not work, just try to create a new workspace then try it again.)

Please note that delete is not an actual delete, the folders/files are still there and kept in Version Control. To permanently delete from TFS, you need to issue a tfs destroy command:

To do this:

  1. Open a Visual Studio Command Prompt.
  2. Issue the following command: tf destroy $/SourceLocation/Folder. Where $/SourceLocation/Folder is the Source location of the deleted folder in TFS.

See Destroy Command for details.

Upvotes: 1

Related Questions