1. Copy the project to a new project directory
  2. Open it and rebuild it to ensure it builds correctly.
  3. In solution explorer right click the solution > Rename
  4. In solution explorer right click the project  > Rename
  5. Below here may need updating….
  6. Rename the main project files to the new project name
  7. Open project by running Visual Studio and then opening the NewProjectName.vcproj file
  8. Expanding the project files tree, in Source Files delete the OldProjectName.cpp file and add the NewProjectName.cpp project file
  9. Delete the original Debug and Release folders.
  10. 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.

Comments

Your email address will not be published. Required fields are marked *