- Copy the project to a new project directory
- Open it and rebuild it to ensure it builds correctly.
- In solution explorer right click the solution > Rename
- In solution explorer right click the project > Rename
- Below here may need updating….
- Rename the main project files to the new project name
- Open project by running Visual Studio and then opening the NewProjectName.vcproj file
- Expanding the project files tree, in Source Files delete the OldProjectName.cpp file and add the NewProjectName.cpp project file
- Delete the original Debug and Release folders.
- Menu > Build > Rebuild Solution and the project should compile.
If you rename the namespace you will need to update the RootNamespace property for the project. Unlike for C# and VB this doesn't seem to be possible via the project properties, but can be done by closing the project, right click YourProjectName.vcproj and open with notepad. Look for the <RootNamespace> entry and update it.
If you rename say the main window file (just right click and re-name) you will get a build error as you will need to update the include to it from the main project .cpp file.
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.