Issue:
ERROR : UBT error : Failed to produce item: G:\UE4.14\Engine\UnrealHeaderTool-Core.dll\Binaries\Win64
UnrealHeaderTool failed for target 'UE4Editor' (platform: Win64, module info: G:\UE4.14\Engine\Intermediate\Build\Win64\UE4Editor\DebugGame\UnrealHeaderTool.manifest).
error MSB3073:The command "..\..\Build\BatchFiles\Build.bat UE4Editor Win64 DevelopmentEditor" exited with code -1.
Solved:
Incredibuild was the issue. The problem is Unreal uses a tool called xgConsole
. Incredibuild also has a command line tool called xgConsole
so it calls the wrong one.
To fix this, removing the Incredibuild path from your environments PATH variable will stop the UBT (Unreal Build Tool) using the wrong program.
All I can say is, thank goodness you can step through the build tool code... would never have found that from the error message!
Some additional information for people getting the above error message but don't have incredibuild:
-
The error is from the link task from running the UBT trying to build the header tool
-
Isn't related to this file, for me it was the first compilation task that failed (since couldn't launch the xgConsole tool).
To debug from the source code, you need to run the UnrealBuildTool project with the following settings:
First:
- UE4Editor Win64Debug
This will run the tool as it would normally. This launches itself (which is where the problem was for me). This sub instance can be launched to debug using the same project but with the following command line arguments:
- UnrealHeaderToolWin64Debug-NoMutex
Hopefully this will be useful to someone :)