It can get pretty tricky to correctly rename a project in Visual Studio so that you can correctly commit the change back to Subversion. I always run into trouble with it, and so I’m recording the steps here so I don’t have to keep repeating the same mistakes.
- Remove the project from the solution.
- Use the Subversion Rename command to change the project’s folder to the desired name.
- Use the Subversion Rename command to change the .csproj file to the desired name.
- Add the project back to the solution.
- Go to project’s Properties, and adjust Assembly Name and Default Namespace to match.
- In code files, fix namespaces to match new name. If you own Resharper, you can select the project in Solution Explorer, and go to Resharper > Refactor > Adjust Namespaces and it will take care of it for you.
- Rebuild the solution, and test to make sure you didn’t inadvertently FUBAR everything.
- Commit to Subversion.