UAT - Issue when it runs causing it not to build / run correctly.

Hi,

Having troubles running UAT.

Running ‘RunUAT.bat’ from any of our build batch files it will fail on the part where it has to build UAT. Please see attached files.

Running ‘RunUAT.bat’ directly usually works with no options, have seen it fail like it gets itself into a bad state.

After looking at ‘RunUAT’ & ‘BuildUAT’ batch files in 5.6.0 seems like they have changed a lot and guessing the C# code has as well.

Please see ‘callstack’ section but when run it complains its cannot find files, these files do exist.

Hard to track down what is going on.

Attached one of our batch files.

I have also include ‘buildUATfailure.txt’ that was run with ‘RunUAT.bat -msbuild-verbose’

Hopefully all this info will help.

Best,

Simon

Hi Simon,

Thanks for reporting this issue.

Our developer who works on UAT is currently away on holiday but is back on Monday.

I’ll loop them in on this issue so they can investigate once they are back.

Cheers,

No problem.

We’ll try to get to the cause of this as fast as we can.

Hi Simon,

Our dev is now back and looking into this.

On this point:

Ran some more tests anytime a build is run from a batch file it fails with all the output. But running directly from a CMD window it works.

Could you clarify if you are running the RunUAT.bat batch file from a cmd window or running

dotnet build Programs\AutomationTool\AutomationTool.csproj -c Development

directly?

Thanks for your patience on this and we will try to get to the root of the issue as fast as we can.

Normally we build the script projects at UAT runtime, but there’s an old GenerateProjectFiles step that adds references into the AutomationTool.csproj project so they’ll build from visual studio (to make it easier to debug those projects), but there may be some pathing issue where these aren’t being resolved correctly. Could you try updating the following line in Engine\Build\BatchFiles\BuildUAT.bat from

dotnet build Programs\AutomationTool\AutomationTool.csproj -c Development -v %MSBUILD_LOGLEVEL%to

dotnet build Programs\AutomationTool\AutomationTool.csproj -c Development -v %MSBUILD_LOGLEVEL% -p AutomationToolProjectOnly=truemaking this change should prevent the script projects from building when the main application is compiled with dotnet and defer compiling them until AutomationTool is run.

it’s the fix, i’ll get it into the 5.6.1 hotfix this week

It should have, the change is in the 5.6 branch https://github.com/EpicGames/UnrealEngine/commit/4930df7e716fb569036b9a565039ddfd4191f40a

No problem, I’ll close this out.

Hi Raymond,

Thank you. This is stopping us from upgrading.

Ran some more tests anytime a build is run from a batch file it fails with all the output. But running directly from a CMD window it works. Tried to find issue myself with no luck.

Hi,

Sorry for pushing is this being looked into?

Best,

Simon

I am running ‘RunUAT.bat’

Here is an example from one of our build batch files.

`@echo off

cls

set CurrentDir=%~Dp0
set ProjectDir=%CurrentDir%......
set EngineDir=%ProjectDir%
set ProjectFile=“%ProjectDir%\P1Game.uproject”
set RunUatBat=“%EngineDir%..\Engine\Build\BatchFiles\RunUAT.bat”
set UeCmdTool=“%EngineDir%..\Engine\Binaries\Win64\UnrealEditor-Cmd.exe”
set BuildsDir=“%ProjectDir%\LocalBuilds”

set BuildConfig=Development
set Platform=XSX

echo.
echo Build CLIENT Platform:%Platform% Config:%BuildConfig%

timeout /t 5

rem call %ProjectDir%..\GenerateProjectFiles.bat

echo.
echo.

call %RunUatBat% -ScriptsForProject=%Projectfile% BuildCookRun -project=%Projectfile% -noP4 -platform=%Platform% -clientconfig=%BuildConfig% -serverconfig=%BuildConfig% -unrealexe=%UeCmdTool% -utf8output -client -build -cook -CookCultures=en -iostore -compressed -package -pak -nocompileeditor -stage -archive -archivedirectory=%BuildsDir% -cmdline=“-Messaging”

echo.
echo.

@pause`

Trying now

Hi Joe,

The batch files are working again.

Changed to:

:Build_AutomationTool echo Building AutomationTool... dotnet build Programs\AutomationTool\AutomationTool.csproj -c Development -v %MSBUILD_LOGLEVEL% -p AutomationToolProjectOnly=true if errorlevel 1 goto Error_UATCompileFailed

Also forced it to always rebuild UAT to make sure.

So this change is this a workaround or the fix?

Thanks,

Simon

Awesome can now rollout 5.6.0

Was I the only one that reported it, seems like many would hit it if trying to build builds through batch files.

Well Joe thank you for the fix.

I tried a number of things but not that one :slight_smile:

Best,

Simon

Hi,

When looking at 5.6.1 I’ve noticed that the fix you gave me didn’t make it in the release, should I still add?

-p AutomationToolProjectOnly=true

Thanks,

Simon

Apologies.

Wrong stream was looked at.

All seems good.

Thank you Joe.