UE5 5.0 branch build error - Chaos

I’m trying to build UE5 from the 5.0 branch using VS2022 Current. I’ve compiled it before with no errors shortly after the branch was created, but now I get stuck with the following problem.

Running GenerateProjectFiles.bat spits out the following error, which fails to find something for Chaos in a non-existent “\Restricted\NotForLicensees” folder. If I go ahead and try to build anyway, it fails.

Anyone encountered this, or have any advice on a work-around? I’m pretty new to building Unreal from source and this is out of my depth.


Binding IntelliSense data...
WARNING: Exception while generating include data for HeadlessChaos: Unable to instantiate module 'HeadlessChaos': System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\username\Documents\GitHub\UnrealEngine\Engine\Restricted\NotForLicensees\Build'.
     at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
     at System.IO.Enumeration.FileSystemEnumerator`1.Init()
     at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
     at System.IO.Enumeration.FileSystemEnumerableFactory.UserEntries(String directory, String expression, EnumerationOptions options)
     at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
     at System.IO.Directory.GetFileSystemEntries(String path)
     at LowLevelTests.UpdateBuildGraphPropertiesFile() in C:\Users\username\Documents\GitHub\UnrealEngine\Engine\Source\Programs\LowLevelTests\LowLevelTests.Build.cs:line 90
     at LowLevelTests..ctor(ReadOnlyTargetRules Target) in C:\Users\username\Documents\GitHub\UnrealEngine\Engine\Source\Programs\LowLevelTests\LowLevelTests.Build.cs:line 67
     at HeadlessChaos..ctor(ReadOnlyTargetRules Target) in C:\Users\username\Documents\GitHub\UnrealEngine\Engine\Source\Programs\HeadlessChaos\HeadlessChaos.Build.cs:line 16
  (referenced via HeadlessChaos.Target.cs)[/list]
Binding IntelliSense data... 100%

Hi @69_Tensors,

I believe the 5.0 branch is not stable and being used for active development for the upcoming 5.0 release.

If you want a stable compile I recommend the ue5-earlyaccess branch.

1 Like

Thanks for the reply.

I’ve actually been using the early access branch for a while, but I’ve been encountering the D3D DXGI_ERROR_DEVICE_REMOVED error reported in threads like this: Runtime D3D Crash of Ue5-ValleyOfTheAncients especially when using raytracing.

I know it could be a driver problem, but I’ve been trying my luck at building a newer branch of UE5 in hopes of getting a more stable experience. That said, if the branch is under active development, it’s not going to be a reliable solution.

ue5-early access is absolutely outdated and both 5.0 and ue5-main branches are in much better state than early access.

On Linux system 5.0 branch is more stable than ue5-main

1 Like

try to completely remove Engine/Intermediate directory prior to generating and build.

1 Like

Thanks for the suggestion; I tried, but no luck.

ue5-main and 5.0 produce the same error. I’ve deleted and re-cloned both repositories twice, and have even purged and reinstalled VC2022 just in case.

The generation script is clearly looking for a Restricted folder under …\Engine\ that is not being provided by the repo or the UE5-Prerequisites…

I suppose I’ll just have to wait this out and see if a future commit fixes it.

As that message is just a WARNING why it stops compilation? Maybe you just have to disable VC22 “stop on warning” somehow?

Hi @69_Tensors,
I have made many builds, recently on the 12th November 2021, a change was added and now the patch is to create the directory so in the Windows Command shell.

C:> mkdir C:\Users\Owner\source\repos\ue50\Engine\Restricted\NotForLicensees
where ue50 is the root of my branch
then GenerateProjectFiles.bat -2022
again and my generate works.

There were 1709 updates to the 5.0 repository which got automatically copied into one of my forks as well because I did one small update!.

My Quixel forked repo had a slight name change due to the final release of VS2022 day, but it still works.
jimshalo10/UnrealEngine-5: Update the Quixel Plugin to the latest version 2012.0.04. The original Early Access 2 branch for VS2022 is “ue5EA-vs2022” (


Hi @Jimbohalo10,

THANK YOU. I can hardly believe it, but your suggestion absolutely fixed it. I just created the empty missing folder “…\Engine\Restricted\NotForLicensees\Build” and re-generated. VS2022 built it with zero errors.

I’m almost embarrassed that was such a simple fix!

FYI, GenerateProjectFiles.bat now raises a warning if you pass the -2022 flag in the Terminal, and directs you to update your BuildConfiguration.xml file instead, as follows:

         <?xml version="1.0" encoding="utf-8" ?>
         <Configuration xmlns="">

I did that, and am happily running a successful build. Thanks again.

1 Like

Your solution work so well. Now I am testing 5.1 :heart_eyes: !

1 Like