Can't build 4.18.1 with BuildGraph

I have a clean source build of 4.18.1, and am trying to package a binary build of the engine using Build Graph.

Unfortunately, it always seems to get to the same point in the build and fails, and it seems related to iPhonePackager.csproj - complaining that DotNetUtililities.dll is in use by another process.

Here is the relevant section of the log:

Running: C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe C:\GIT\UnrealEngine\Engine\Source\Programs\UnrealControls\UnrealControls.csproj /property:Platform=AnyCPU /property:Configuration=Development /verbosity:minimal /nologo
    UnrealControls -> C:\GIT\UnrealEngine\Engine\Binaries\DotNET\UnrealControls.dll
Took 0.6531676s to run MSBuild.exe, ExitCode=0
Running: C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe C:\GIT\UnrealEngine\Engine\Source\Programs\IOS\iPhonePackager\iPhonePackager.csproj /property:Platform=AnyCPU /property:Configuration=Development /verbosity:minimal /target:Rebuild /verbosity:minimal /nologo
  C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4604,5): warning MSB3061: Unable to delete file "C:\GIT\UnrealEngine\Engine\Binaries\DotNET\DotNETUtilities.dll". Access to the path 'C:\GIT\UnrealEngine\Engine\Binaries\DotNET\DotNETUtilities.dll' is denied. [C:\GIT\UnrealEngine\Engine\Source\Programs\DotNETCommon\DotNETUtilities\DotNETUtilities.csproj]
  C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3813,5): warning MSB3026: Could not copy "obj\Development\DotNETUtilities.dll" to "..\..\..\..\Binaries\DotNET\DotNETUtilities.dll". Beginning retry 2 in 1000ms. The process cannot access the file '..\..\..\..\Binaries\DotNET\DotNETUtilities.dll' because it is being used by another process. [C:\GIT\UnrealEngine\Engine\Source\Programs\DotNETCommon\DotNETUtilities\DotNETUtilities.csproj]

The build then fails. I can’t seem to get this to work no matter what I try. I’m building for Windows PC and PS4, so I don’t even know why iPhonePackager is being included anyway (it seems like there is some kind of core dependency on it, which is really annoying :/)

Any clues on how to fix this?

This post is to add to the previous Unreal Engine user (sorry couldn’t find an appropriate word to use), As I am having similar difficulties on my HP Pavilion laptop. I’ve recently downloaded 4.18.1 and it was working up until a point but then the errors and the code started going haywire. I’ve recorded a whole lot of errors with the recent update 4.18.1 I thought it was strange that all these errors was appearing in the filter panel within Unreal Engine 4.18.1 AND (capital letters) Visual Studio Community 2017! Laptop is a brand new HP laptop. Nothing wrong with the laptop! (Sorry for my English syntax, I’m physically disabled and my right arm is tired of thinking and typing at the same time!) Hope these issues can be resolved very soon!

I have discovered the solution to my issue.

It was caused because I was invoking AutomationTool.exe directly - when in fact you should be invoking AutomationToolLauncher.exe which copies the required dependencies (including DotNetUtilities.dll) into a shadow directory.

User-error!

@BFuller - that looks like a different issue entirely, I would suggest making another thread.