It looks like there’s a bug in the BuiltUAT.bat file. I’m looking at the source branch for 5.1 (BuildUAT.bat latest commit [d8253f2] on Oct 5, 2022). Starting at line 43, the code looks like this:
if not exist ..\Binaries\DotNET\AutomationTool\AutomationTool.dll goto Build_AutomationTool
set MSBUILD_LOGLEVEL=%1
if not defined %MSBUILD_LOGLEVEL set MSBUILD_LOGLEVEL=quiet
I had to rearrange these two blocks so the “if not exist” line comes after the “set MSBUILD_LOGLEVEL” line.
set MSBUILD_LOGLEVEL=%1
if not defined %MSBUILD_LOGLEVEL set MSBUILD_LOGLEVEL=quiet
if not exist ..\Binaries\DotNET\AutomationTool\AutomationTool.dll goto Build_AutomationTool
You can test this on a “working” version of the source by deleting “Engine\Binaries\DotNET\AutomationTool\AutomationTool.dll”. BuildUAT.bat will start failing again without the fix.