My current solution for renaming the project folder is:
- Remove the project from the solution.
- Rename the folder outside Visual Studio.
- Re-add the project to the solution.
Is there any better way?
My current solution for renaming the project folder is:
Is there any better way?
I have written a small tool that automates all these steps. Also supports subversion for now.
Information about current releases can be found here Visual Studio Project Renamer Infos
Latests releases can now be downloaded from the Visual Studio Project Renamer Download Page
Feedback is much appreciated.
I use VS 2013 and TFS 2013.
I did it like this:
I just had to do this myself (using VS2010). As some folks have answered, the simplest step seems to be:
1-Rename the project outside VS. 2-edit your_project_name.sln with a text editor, rename the path to the new path
To rename a project's folder, file (
.*proj
) and display name in visual studio:.sln
file directly in another editor such as Notepad++ and update the paths there instead. (You may need to check-out the solution first in TFS etc.)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 match:
Also consider modifying the values of the following assembly attributes:
AssemblyProductAttribute
AssemblyDescriptionAttribute
AssemblyTitleAttribute
You may wish to vote for the Visual Studio team to automate this procedure.
I did the following:
Rename the project from within vs2013. (optional/not needed)
Export the project as a template.
Close the solution.
Reopen the solution
Create a project from the saved template and use the name you like.
Delete from the solution explorer the previous project.
In this point I tried to compile the new solution and to do so i had to manually copy some resources and headers to the new project folder from the old project folder. Do this until it compiles without errors. Now this new project saved the ".exe" file to the previous folder.*
So ->
Go to windows explorer and manually copy the solution file from the old project folder to the new project folder.
Close the solution, and open the solution from within the new project.
Changed the configuration back to (x64) if needed.
Delete the folder of the project with the old name from the folder of the solution.