Rename a project in Visual Studio (ReSharper/TFS)

ReSharperTFSVisual Studio

Please contribute by voting. Thanks!
This guide uses Visual Studio 2015 and ReSharper. It also assumes that TFS is used as revision control system. Take backup before you do this and make sure that you don't have any modified files. If things go wrong, you cold be forced to get the whole solution from the repository again.

This is how you do it:

* Right-click the project in Solution Explorer, select Rename, and enter the new name

* Right-click the project again and select Properties. Change the "Assembly name" and "Default namespace" on the Application tab.

* Right-click the project again and select Refactor -> Adjust Namespaces. Accept the changes.

* Change the AssemblyTitle and AssemblyProduct in Properties/AssemblyInfo.cs

* Delete bin and obj directories in Windows Explorer

* Open the Source Control Explorer and rename the project's directory. This will close the solution. Let it be closed.

* Open the SLN file (with a text editor such as Notepad++) and change the path to the project (there should be multiple places).

* Open the Solution again. Clean and Rebuild the project.

Article created: Dec 16 '15. Edited Dec 16 '15.

1 Comment

Michael Ramey [1]  •  Aug 9 '17  •   •  Reply

Thanks for pulling this together, When I start projects from scratch, My namespaces always evolve and it's nice to have instructions on how to adjust everything accordingly.

Your comment

You need to sign up / log in to comment this article


Created by coredev [38] Dec 16 '15

Share article

Do you know about


Write an article