Introduction
How do I rename a TFS-managed project without losing the change history?
Sometimes the name of a project needs to be modified during the project development process to be more prepared to express its functionality due to insufficient upfront consideration at work. This article will be a catalyst for this
Operation
- Rename the directory where the item you want to modify is located in SourceControl
- Remove the item that is currently being renamed (because the local directory is also modified after renaming in SourceControl, so the VS cannot find the corresponding item in solution, so remove first)
- Add the item to solution from the renamed folder by adding the existing item in the same way
- To rename a project
- Modify the corresponding project property, assembly name, and namespace name in the project
- Re-add the reference to the project in solution that needs to reference the purpose of the rename item.
- To modify the code namespace in a renamed project
- Modify a reference to this renamed project namespace
Summarize
Deal with ideas: always let TFS know what you want to change the project to, what name. Grasp this idea, the operation of the time will be handy.
TFS modifies the project name