Build error: MSB3073: The command "....\Build\BatchFiles\Build.bat UE4Editor Win64 Development" exited

The Problem

I encountered the following error while building UE4 from source:

error MSB3073: The command "....\Build\BatchFiles\Build.bat UE4Editor Win64 Development" exited with code -1

When I looked for solutions on the web, I realized that a lot of people had this problem, but I couldn’t find any clear solution. Most answers just advised a clean install, including of the OS. I tinkered around a bit and found the exact solution to my problem.

The Solution

Install DirectX.

You my think you have it installed but look again. This is what happened to me. The exe you download from the link is an extractor, not an installer. Extract the files to the specified folder, then go inside the folder and then run the Setup.exe to actually install DirectX.

How I found the solution

I ran the Build.bat file indicated in the error message from the command line with the arguments in the error message (UE4Editor Win64 Development). I then got to see the actual error message via a popup box, which indicated that the XInput dll was not found. This is when I realized that I hadn’t actually installed DirectX in the first place.

I hope this helped.

Self answered the question.

This was indeed the solution to this compilation error. Which is a bit weird since DirectX is an integral part of Win7. The problem was with XInput1_3.dll and downloading the DX End-User Runtime from here: https://www.microsoft.com/en-us/download/confirmation.aspx?id=8109 should solve the problem. Thanks for the hint