# What happened to the BuildTarget command for RunUAT?

**URL:** <https://forums.unrealengine.com/t/what-happened-to-the-buildtarget-command-for-runuat/432671>\
**Category:** Platform & Builds\
**Tags:** automation-tool, UE4-17, unreal-engine, Packaging, question\
**Created:** [August 28, 2018, 10:30pm UTC](https://forums.unrealengine.com/t/what-happened-to-the-buildtarget-command-for-runuat/432671 "2018-08-28T22:30:13Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_e32decfc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e32decfc](https://forums.unrealengine.com/u/anonymous_user_e32decfc)\
**Post date:** [August 28, 2018, 10:30pm UTC](https://forums.unrealengine.com/t/what-happened-to-the-buildtarget-command-for-runuat/432671/1 "2018-08-28T22:30:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e32decfc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e32decfc](https://forums.unrealengine.com/u/anonymous_user_e32decfc)\
**Post date:** [September 5, 2018, 4:10pm UTC](https://forums.unrealengine.com/t/what-happened-to-the-buildtarget-command-for-runuat/432671/2 "2018-09-05T16:10:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ben\_Marsh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ben\_Marsh](https://forums.unrealengine.com/u/Ben_Marsh)\
**Post date:** [September 5, 2018, 5:31pm UTC](https://forums.unrealengine.com/t/what-happened-to-the-buildtarget-command-for-runuat/432671/3 "2018-09-05T17:31:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e32decfc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e32decfc](https://forums.unrealengine.com/u/anonymous_user_e32decfc)\
**Post date:** [September 5, 2018, 5:52pm UTC](https://forums.unrealengine.com/t/what-happened-to-the-buildtarget-command-for-runuat/432671/4 "2018-09-05T17:52:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ben\_Marsh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ben\_Marsh](https://forums.unrealengine.com/u/Ben_Marsh)\
**Post date:** [September 5, 2018, 5:55pm UTC](https://forums.unrealengine.com/t/what-happened-to-the-buildtarget-command-for-runuat/432671/5 "2018-09-05T17:55:49Z")

</div>

Can you build the target correctly from Visual Studio?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e32decfc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e32decfc](https://forums.unrealengine.com/u/anonymous_user_e32decfc)\
**Post date:** [September 5, 2018, 7:13pm UTC](https://forums.unrealengine.com/t/what-happened-to-the-buildtarget-command-for-runuat/432671/6 "2018-09-05T19:13:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ben\_Marsh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ben\_Marsh](https://forums.unrealengine.com/u/Ben_Marsh)\
**Post date:** [September 5, 2018, 7:14pm UTC](https://forums.unrealengine.com/t/what-happened-to-the-buildtarget-command-for-runuat/432671/7 "2018-09-05T19:14:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e32decfc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e32decfc](https://forums.unrealengine.com/u/anonymous_user_e32decfc)\
**Post date:** [September 6, 2018, 5:54pm UTC](https://forums.unrealengine.com/t/what-happened-to-the-buildtarget-command-for-runuat/432671/8 "2018-09-06T17:54:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ben\_Marsh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ben\_Marsh](https://forums.unrealengine.com/u/Ben_Marsh)\
**Post date:** [September 6, 2018, 6:20pm UTC](https://forums.unrealengine.com/t/what-happened-to-the-buildtarget-command-for-runuat/432671/9 "2018-09-06T18:20:32Z")

</div>

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");
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e32decfc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e32decfc](https://forums.unrealengine.com/u/anonymous_user_e32decfc)\
**Post date:** [September 6, 2018, 7:21pm UTC](https://forums.unrealengine.com/t/what-happened-to-the-buildtarget-command-for-runuat/432671/10 "2018-09-06T19:21:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e32decfc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e32decfc](https://forums.unrealengine.com/u/anonymous_user_e32decfc)\
**Post date:** [September 6, 2018, 9:28pm UTC](https://forums.unrealengine.com/t/what-happened-to-the-buildtarget-command-for-runuat/432671/11 "2018-09-06T21:28:50Z")

</div>

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