visual-studio-2008visual-studio-2005tfsdirectory

Renaming the containing project folder in VS.NET under TFS


I have a VS.NET project, and after some refactoring, have modified the name of the project. How can I easily rename the underlying Windows folder name to match this new project name under a TFS controlled project and solution?
Note, I used to be able to do by fiddling with things in the background using SourceSafe ...


Solution

  • Just right click on the folder in TFS, and select Rename. Once you commit the rename, TFS will make the changes on disk for you. As Kevin pointed out, you will want to make sure that everything is checked in, because TFS will remove the old folder and everything in it, and pull down the renamed folder with the current version of the files in it.

    One final note: You can't rename a folder that you haven't mapped, or that you haven't done a "Get" from. I don't know why, but TFS will disable the Rename option in these cases.

    At least that's what happened to me, if I remember correctly.