Rider+Unreal, switching targets recompiles everything all the time

I’m using Rider for C++ development, and prefer to run with a Game target when developing C++, which is better for a number of reasons. But the Editor target is needed for editing assets, or cooking assets recently arrived from Git LFS.

Switching between the targets is torture. On Mac, it rebuilds every single source file every time. On Windows, some of the time. This is in addition to the obligatory 10-20 seconds of “Syncing Projects” and “Processing Files” in Rider.

Here’s what I’ve tried so far, without success:

  • Making multiple target and build configurations, hoping that they somehow have separate caches. They don’t.
  • Ensuring that there’s no difference between compilation options between Game target and Editor target .cs files. But even so, we must assume the compiler flags are different, because Game would never be compiled with WITH_EDITOR.
  • Launching Unreal Editor “on the side” while in Game target in Rider, allowing some quick asset editing and cooking and then returning to Rider to run the game in Game mode. This works some of the time on Windows, and none of the time on Mac. The editor will want to rebuild the project files, and that works some of the time on Windows, but only if there are no existing binaries for an editor build from Rider.

Here’s what I haven’t tried yet:

  • Literally pulling the whole Git repo into two separate directories, and running each clone in a separate mode. You’d then relaunch Rider into each mode. This would be a chore, but would keep the builds separate and Unreal less confused.

Any ideas are welcome.

Per