What happened to the BuildTarget command for RunUAT?

I have been working on upgrading our engine from 4.15 to 4.19 and came across an issue with the automatic builder one of my predecessors set up. It makes use of the Unreal Automation Tools to compile, build, and package the project. After further inspection, I noticed that the BuildTarget command was removed from UAT in 4.17. I have tried simply commenting out the troublesome code but that throws errors when it makes it to the BuildCookRun cycle. The line that no longer runs is

UE4/Engine/Build/BatchFiles/RunUAT BuildTarget -TargetPlatforms=Win64 -Config=Development -project=projectfilepath -Target=Editor -precompile

with the output

ERROR: Failed to find command BuildTarget

Any help and advice would be greatly appreciated.

Thanks all

Still having trouble with this but I believe I have gotten a bit farther. I replaced the RunUAT BuildTarget call with a call to Build.bat and it seems to be compiling. The new issue I am facing is that the BuildCookRun sequence is halting when it tries to build a server .exe and spits out the following error:

libeay.lib(rand_win.obj) : error LNK2019: unresolved external symbol BCryptGenRandom referenced in function RAND_poll

I am unsure if this has something to do with the new way of building the project source but I cannot find the calls referenced in the error anywhere in the code and the only thing I have to go from is that it is a
Windows function. The builder is working on a Windows Server 2012R and it is trying to build in VS2015.

We do have Windows 8.1 SDK installed as well as 7.0A, 7.1A, 8.1A, and 10.0A

The old BuildTarget command was a simple wrapper for executing UnrealBuildTool, so calling Build.bat directly is the correct replacement. You can always run a package command from the editor and see the command line that was executed in the output log.

The BCryptGenRandom function was introduced in Windows Vista. We target the Windows 8.1 SDK by default. Do you have it installed?

Can you build the target correctly from Visual Studio?

Can you include a log of building from UAT vs building the same target from Visual Studio, please?

Yes, building from source in VS is not a problem.

Linked are the output logs of the Automated Builder (which fails on the BuildCookRun cycle of the server) and the building of the project in VS on a local workspace

Your Visual Studio log is from building the editor, not the server target of your game (you can change this from the configuration drop-down in Visual Studio).

It sounds like you’re missing a dependency on bcrypt.lib. Try adding this to your game’s .build.cs file:

		PublicAdditionalLibraries.Add("bcrypt.lib");

That seemed to work in the VS build. tested with both server build and editor build. I have attached the logs to confirm.

This worked quite well and the automated builder succeeded in building the server. Thank you so much for your help!