BuildUAT.bat gives argument missing error on initial source code build step

Hi there,
For the initial/fresh building step from source I have a problem regarding building of UAT.

As described in documentation, I call Setup.bat and GenerateProjectFiles.bat scripts as initial steps.

After this step, I want to build Unreal AutomationTool, hence I use the command:

./Engine/Build/BatchFiles/BuildUAT.bat normal force

When I execute the command, I get this error. It seems error might be related with Dotnet

But I after I make a installed build with the command:

./Engine/Build/BatchFiles/RunUAT.bat BuildGraph -script=“Engine/Build/InstalledEngineBuild.xml” -target=“Make Installed Build Win64” -set:HostPlatformOnly=true

I can run this command successfully:

./Engine/Build/BatchFiles/BuildUAT.bat normal force

In this scenerio, only after executing InstalledEngineBuild command I can execute BuildUAT.bat command successfully.

How can I execute BuildUAT.bat command successfully without needing InstalledEngineBuild first?

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.

1 Like