How to properly rename a C++ project without breaking anything

I am wanting to rename my C++ project, but the ‘Compile’ button in UE4 fails after renaming the project, even though rebuilding in Visual Studio works just fine. Is there any specific process to rename projects that have C++ code? I’d imagine there is, as old files stick around with the old names.

It’s not easy, you have to do it all manually as there’s not really an automated option. Adding the class redirects above will only fix parented blueprints, and tbh it’s not the cleanest method ever. You’d be better off just re-parenting all the blueprints that fails to compile when you open the editor to save yourself any weirdness down the line.

I would do this:

  1. Delete all VS files, Intermediatte, Saved, Build & Binaries folders.
  2. Rename the UProject file and edit it in notepad to ensure there’s nothing in there that goes by the old project name
  3. Check the Config files for any /Script/MyGame entries in ] brackets, and rename them
  4. Rename all of the source files manually in Windows, then do a big ol’ fine-and-replace pass on them all.
  5. Regenerate VS project files

If it doesn’t compile after that, I’ll be very surprised. Find and Replace will probably miss a bunch of things, but this strikes me as the cleanest method.

I’d just make a new project and copy paste all your code and content into the new project.

If your project is heavily Blueprint-based then have fun with that. Will have to go through and fix every one individually. They don’t take kindly to being moved.

Check this:

And upvote :slight_smile:

Just saw your thread, definitely some features I would like to see! It looks like so far there is no good way to do this :frowning:

Perhaps you could reply on the thread saying you want it as well, the more the merrier - and the more likely we are to get Epic’s attention.

You can follow the steps hereor use the free renaming tool](