Horde example job does not run setup and fails due to missing project files

I have installed Horde Server and Agent on my build computer according to this tutorial. I then looked into automating builds using Horde in this other tutorial. I interpret that after changing relevant config files that a build should just work. So I try to run a build, but it fails due to missing project files.

Setting env var: IsBuildMachine=1
Setting env var: P4CLIENT=Horde+BUILDMACHINE+Demo
Setting env var: P4USER=[Redacted] 
Setting env var: UE_HORDE_AVAILABILITY_ZONE=
Setting env var: UE_HORDE_BATCHID=78c6
Setting env var: UE_HORDE_CLEANUP=C:\HordeAgent\Sandbox\Demo\Sync\Cleanup.bat
Setting env var: UE_HORDE_GRAPH_UPDATE=C:\HordeAgent\Sandbox\Demo\Sync\Engine\Saved\Horde\Graph.json
Setting env var: UE_HORDE_JOBID=67c0422cd276b08dfd24bba6
Setting env var: UE_HORDE_LEASE_CLEANUP=C:\HordeAgent\Sandbox\Demo\Sync\CleanupLease.bat
Setting env var: UE_HORDE_REGION=
Setting env var: UE_HORDE_SHARED_DIR=C:\HordeAgent\Sandbox\Saved
Setting env var: UE_HORDE_STEPID=7bc9
Setting env var: UE_HORDE_STEPNAME=Setup Build
Setting env var: UE_HORDE_STREAMID=ue5-release-5.5
Setting env var: UE_HORDE_TEMPLATEID=packaged-build
Setting env var: UE_HORDE_TEMPLATENAME=Packaged Lyra Build
Setting env var: UE_HORDE_TOKEN=[redacted]
Setting env var: UE_HORDE_URL=http://localhost:13340/
Setting env var: UE_LOG_JSON_TO_STDOUT=1
Setting env var: UE_TELEMETRY_DIR=C:\HordeAgent\Sandbox\Demo\Sync\Engine\Programs\AutomationTool\Saved\Telemetry
Setting env var: UE_TESTDATA_DIR=C:\HordeAgent\Sandbox\Demo\Sync\Engine\Programs\AutomationTool\Saved\TestData
Setting env var: UE-S3DataCachePath=None
Setting env var: uebp_BuildRoot_Escaped=++[Redacted]+main
Setting env var: uebp_BuildRoot_P4=//[Redacted]/main // MyDepot is not the actual depot name. I changed it due to confidentiality.
Setting env var: uebp_CL=530
Setting env var: uebp_CLIENT=Horde+BUILDMACHINE+Demo
Setting env var: uebp_CLIENT_ROOT=//Horde+BUILDMACHINE+Demo
Setting env var: uebp_CodeCL=521
Setting env var: uebp_LOCAL_ROOT=C:\HordeAgent\Sandbox\Demo\Sync
Setting env var: uebp_LogFolder=C:\HordeAgent\Sandbox\Demo\Sync\Engine\Programs\AutomationTool\Saved\Logs
Setting env var: uebp_PORT=[Redacted]:1666
Setting env var: uebp_USER=[Redacted]
Executing C:\WINDOWS\system32\cmd.exe /C ""C:\HordeAgent\Sandbox\Demo\Sync\Engine\Build\BatchFiles\RunUAT.bat" BuildGraph -Script=Engine/Build/Graph/Tasks/BuildAndTestProject.xml -HordeExport=C:\HordeAgent\Sandbox\Demo\Sync\Engine\Saved\Horde\Exported.json -ListOnly -Target="BuildAndTest Lyra" -set:ProjectFile=Samples/Games/Lyra/Lyra.uproject -set:TargetName=LyraGame -set:EditorTargetName=LyraEditor -set:WithDeviceReservation=false -set:WithWin64Editor=true -set:EditorBootTest=false -set:WithWin64=true -set:WithMac=false -set:WithLinux=false -set:WithAndroid=false -set:WithIOS=false -set:WithTVOS=false -set:WithDevelopmentTargets=true -set:WithDevelopmentPackages=true -set:WithDevelopmentTests=true -set:TargetBootTest=true -set:GauntletDeviceService=http://localhost:13340 -set:GauntletDevicePool=UE5"
Running AutomationTool...
Using bundled DotNet SDK version: 8.0.300
Building AutomationTool...
C:\HordeAgent\Sandbox\Demo\Sync\Engine\Source\Programs\AutomationTool\AutomationTool.csproj(2,3): error MSB4019: The imported project "C:\HordeAgent\Sandbox\Demo\Sync\Engine\Source\Programs\Shared\UnrealEngine.csproj.props" was not found. Confirm that the expression in the Import declaration "..\Shared\UnrealEngine.csproj.props", which evaluated to "..\Shared\UnrealEngine.csproj.props", is correct, and that the file exists on disk.

Build FAILED.

C:\HordeAgent\Sandbox\Demo\Sync\Engine\Source\Programs\AutomationTool\AutomationTool.csproj(2,3): error MSB4019: The imported project "C:\HordeAgent\Sandbox\Demo\Sync\Engine\Source\Programs\Shared\UnrealEngine.csproj.props" was not found. Confirm that the expression in the Import declaration "..\Shared\UnrealEngine.csproj.props", which evaluated to "..\Shared\UnrealEngine.csproj.props", is correct, and that the file exists on disk.
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.78

RunUBT ERROR: UnrealBuildTool failed to compile.

RunUAT.bat ERROR: AutomationTool failed to compile.
BUILD FAILED

When I run any job I get this error. If I run Setup.bat before it seems to be working (though build fails much later on for seemingly unrelated reasons). If I then run the same build again the project files are removed - I have to run Setup.bat again!
Am I missing something? Am I supposed to have the binary files in the depot so I download them directly? Is there something else wrong?

I actually haven’t figured out how to get setup.bat to be run as part of the horde process. and i would definitely like to know what you are supposed to do for that. (seems like it should just be a line to insert somewhere)

But the auto-deleting is because the workspace is set to not be incremental.

Setting incremental: true (just like it is in the incremental compile example) will cause the changed files to stick around.

in the ue5-release-5.5.stream.json in the horde server just put “incremental”:true in

workspaceTypes > Full

or whatever the workspace is for the job. You can see how it is done in workspaceTypes > IncrementalCompileOnly.

This should make debugging a bit quicker as prior successful steps will just skip if you have one step at the end that is having errors. And also the files will still be on disk for you to check out afterwards.

But sometimes you will get those errors that require you to do a fresh build so every now and then you might find you have to do a full conform to flush the workspace out and start from scratch.