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 ...
Summary Steps Rename the folder(s) outside Visual Studio. Open the solution in Visual Studio, ignoring the warnings. Go through all unavailable projects and click “F4” key view project properties. Set the file path to the new folder location.
Rename a File or FolderIn the desktop, click or tap the File Explorer button on the taskbar. Select the file or folder you want to rename. Click or tap the Rename button on the Home tab. With the name selected, type a new name, or click or tap to position the insertion point, and then edit the name.
No
' when prompted to get projects that were newly added to the solution from source control. You will get a warning that one of the projects in the solution could not be loaded.Note that it will be grayed out and marked as 'Unavailable'.
...
' button.
Note also that this property is only editable in Visual Studio 2010. In newer versions of Visual Studio, you will need to manually edit the project paths within the solution file.
Note: Other suggested solutions that involve removing and then re-adding the project to the solution will break project references.
If you perform these steps then you might also consider renaming the following to suit.
Also, consider modifying the values of the following assembly attributes.
AssemblyProductAttribute
AssemblyDescriptionAttribute
AssemblyTitleAttribute
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With