I have two C++ projects located on different drives (C:\ and D:). I use Rider 2024.3.4 for development.
The issue I’m facing is that when I switch between these projects, Unreal triggers a full engine recompile of 2000+ modules, even though there are no changes. For example:
If I build the project on **D:**, everything works fine.
If I then switch to the project on **C:**, it starts recompiling all engine modules again before launching.
However, if I continue working within the same project (on either drive), only the modified C++ files are recompiled as expected.
Is this expected behavior? Could this be related to Unreal's build system, Rider, or having projects on separate drives? Are there any ways to avoid the full recompile when switching between projects?
It’s definitely not a full engine recompile (Unreal has over 6,5 thousand files to process).
Though it seems to be more problematic in Rider (Visual Studio seems to not need to pre-compile as much on project launch).
Maybe it’s only holding on to some internally cached data that is cleared on drive change?
An post regarding an older version of rider, but maybe migrating the cache folder to a single drive might fix this?
2000+ modules compile no matter which method I use—whether it’s Visual Studio, Rider, or the command line.
I found an alternative way to compile projects using dotnet instead of UnrealBuildTool. However, even when using these approaches, the excessive module compilation persists.
I’ve tried the following methods in addition to the standard Visual Studio and Rider build processes (Build → Build [CppProjectName]):
"D:\UE_5_3_Source\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe" <CppProjectName>Editor Win64 Development -Project="D:\UE_5_3_Source\Projects\Aura_UE_5_3\Aura.uproject" -WaitMutex -FromMsBuild
dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" <CppProjectName>Editor Win64 Development -Project="[ProjectPathIncludingName].uproject" -WaitMutex -FromMsBuild
but i will try migrating the cache folder to a single drive.
i found something -SkipRulesCompile will try later.
Additionally, you can use the SkipRulesCompile command-line option to skip compiling rules assemblies and assume they are valid:
dotnet "E:\\UnrealEngine\\UE_5.4\\Engine\\Binaries\\DotNET\\UnrealBuildTool\\UnrealBuildTool.dll" -project=".uproject" -Build -platform=Win64 -configuration=Development -SkipRulesCompile
The issue was caused by differences in the .Target.cs files for each project. The [CppProjectName].Target.cs and [CppProjectName]Editor.Target.cs files had different configurations, including DefaultBuildSettings, IncludeOrderVersion, etc..
When I ensured that both projects had matching configurations, Unreal only compiled the modified C++ files instead of triggering 2000+ engine modules recompile when switching between projects.