Visual Studio rebuilding engine unnecessarily in 4.19

Hey guys,

I’ve had this on 2 different computers so far after upgrading to 4.19. I saw some reports of it in the 4.19 Transition Guide thread but there wasn’t a consistent resolution posted.

I enabled verbose logging for the UBT and there is lots of this in the output:

UnrealBuildTool: VERBOSE: SharedPCH.UnrealEd.cpp: Included file MinimalWindowsApi.h is newer than the last execution of the action: 8/06/2018 5:37:42 PM vs 7/06/2018 3:47:58 PM
UnrealBuildTool: VERBOSE: Outdated action: SharedPCH.UnrealEd.cpp
UnrealBuildTool: VERBOSE:   -> DEEP include scan: D:\bd-dev\BD-PROG-SDK\Epic\UnrealEngine-blackdelta\Engine\Intermediate\Build\Win64\UE4Editor\Development\UnrealEd\SharedPCH.UnrealEd.h

I still have the log from the previous time the problem occurred and it was for a different file that time:

UnrealBuildTool: VERBOSE: PostProcessAA.cpp: Prerequisite SharedPCH.Engine.h.pch is newer than the last execution of the action: 7/06/2018 8:49:58 AM vs 7/06/2018 8:15:38 AM
UnrealBuildTool: VERBOSE: Outdated action: PostProcessAA.cpp
UnrealBuildTool: VERBOSE:   -> DEEP include scan: D:\bd-dev\BD-PROG-SDK\Epic\UnrealEngine-blackdelta\Engine\Source\Runtime\Renderer\Private\PostProcess\PostProcessAA.cpp

I changed the Build and Run setting to ‘Prompt before build’ to add a bit of protection. I changed over to non-unity build as well but the problem still happens as well. For the our project sln I also changed the Configuration Manager setting it to only build our project, but these outdated actions are within that build.

Is there any known fix for this or anything else I can try?

Many thanks

Have you tried to force a complete rebuild?

  1. Delete entire engine directory and download engine source again
  2. Build from scratch
  3. Go to your game and delete the Binaries and Intermediate directories
  4. Switch engine, generate project files, compile project

I’ve noticed in the past that VS had the habit of recompiling the engine out of the blue for some reason. I don’t know why it does that. If you have plenty of space to spare, you could set up FASTBuild for Unreal. Keep in mind that ideally you want the cache to be on an SSD (with like 75-100GB of free space). I don’t know how much speedup you’d get on an HDD.
Building with FASTBuild for the first time takes longer, because it creates the cache. After that, recompiling becomes a lot faster.

Thanks for the response. Yep that’s pretty much what I did before building 4.19 for the first time on this machine. Thanks for the tip of FASTBuild though, sounds interesting