RunUAT.bat ERROR with UE 4.10

I’m trying to setup continuous integration builds. I’m using RunUAT.bat to build on an unreal project on windows server.

I’m running into an issue where AutomationScripts.Automation is prepending the path to the engine on to the path to my project file.

Executing the following commandline. (workingFolder = C:\agent_work\5\s)
C:\Program Files (x86)\Epic Games\4.10\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project=“%BUILD_REPOSITORY_LOCALPATH%\HotGlueTactics.uproject” -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -stage -pak -archive -archivedirectory=“%BUILD_REPOSITORY_LOCALPATH%\Output”

Error message highlight pattern:

Warning message highlight pattern:

Running AutomationTool…

Program.Main: CWD=C:\Program Files (x86)\Epic Games\4.10\Engine\Binaries\DotNET
Automation.ParseCommandLine: Parsing command line: BuildCookRun -project=C:\agent_work\5\s\HotGlueTactics.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -stage -pak -archive -archivedirectory=C:\agent_work\5\s\Output

Automation.Process: IsBuildMachine=False

Automation.Process: ShouldKillProcesses=True

Automation.Process: Setting up command environment.

CommandUtils.SetEnvVar: SetEnvVar uebp_EngineSavedFolder=C:/Program Files (x86)/Epic Games/4.10/Engine/Programs/AutomationTool/Saved

CommandUtils.DeleteDirectoryContents: DeleteDirectoryContents(C:/Program Files (x86)/Epic Games/4.10/Engine/Programs/AutomationTool/Saved/Logs)

WindowsHostPlatform.SetFrameworkVars: Setting .Net Framework environment variables.

WindowsHostPlatform.SetFrameworkVars: Supports64bitExecutables=True

WindowsHostPlatform.SetFrameworkVars: WindowsPlatform.CompilerVisualStudio2015

WindowsHostPlatform.SetFrameworkVars: WindowsSDKDir=C:\Program Files (x86)\Windows Kits\8.1\

WindowsHostPlatform.SetFrameworkVars: BaseVSToolPath=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools

WindowsHostPlatform.SetFrameworkVars: Setting VS environment variables via C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools....\VC\bin\x86_amd64\vcvarsx86_amd64.bat.

CommandUtils.SetEnvVar: SetEnvVar FrameworkDir=C:\Windows\Microsoft.NET\Framework\

CommandUtils.SetEnvVar: SetEnvVar FrameworkVersion=v4.0.30319

WindowsHostPlatform.SetFrameworkVars: FrameworkDir=C:\Windows\Microsoft.NET\Framework\

WindowsHostPlatform.SetFrameworkVars: FrameworkVersion=v4.0.30319

ProjectUtils.CleanupFolders: Cleaning up project rules folder

CommandUtils.DeleteDirectoryContents: DeleteDirectoryContents(C:\Program Files (x86)\Epic Games\4.10\Engine\Programs\AutomationTool\Saved\Rules)

Automation.Process: Compiling scripts.

ScriptCompiler.LoadPreCompiledScriptAssemblies: Loading precompiled script DLLs

ScriptCompiler.LoadPreCompiledScriptAssemblies: Found 9 script DLL(s).

ProjectUtils.CompileAndLoadTargetsAssembly: Compiling targets DLL: C:\Program Files (x86)\Epic Games\4.10\Engine\Programs\AutomationTool\Saved\Rules\UATRules_BaseEngine_.dll

BranchInfo…ctor: Base Engine:

BranchInfo…ctor: 0 Code projects:

BranchInfo…ctor: 0 Non-Code projects:

BuildCommand.Execute: ERROR: BUILD FAILED

Program.Main: ERROR: AutomationTool terminated with exception:

Program.Main: ERROR: Exception in AutomationScripts.Automation: Could not find a project file C:\Program Files (x86)\Epic Games\4.10\C:\agent_work\5\s\HotGlueTactics.uproject.

Stacktrace: at BuildCookRun.get_ProjectPath()

at BuildCookRun.ExecuteBuild()

at BuildCommand.Execute()

at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands)

at AutomationTool.Automation.Process(String[] CommandLine)

at AutomationTool.Program.MainProc(Object Param)

at AutomationTool.InternalUtils.RunSingleInstance(Action`1 Main, Object Param)

at AutomationTool.Program.Main()

ProcessManager.KillAll: Trying to kill 0 spawned processes.

Program.Main: AutomationTool exiting with ExitCode=Error_Unknown

Domain_ProcessExit

copying UAT log files…

RunUAT.bat ERROR: AutomationTool was unable to run successfully.

BUILD FAILED

1 Like

I would like an answer on this too, I’ve run into this issue before.

having the same issue and would love an answer, have either of you had success using RunUAT.bat with older versions?

change your visual studio on control panel > press modify button > check c++ from programming languages. :slight_smile:

This error is still relevant with 4.21+. It’s a weird bug that took me some time to understand.

If you follow A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums, chances are that RunUAT is not in any execution path and you are going to prefix it with the C://UnrealEngine/Engine/Build/BatchFiles path. If you do that, you must surround this whole command with double-quotes or else the Engine/Build/BatchFiles path will be used as a default path prefixing your project just like the OP experienced.

1 Like