Error D8037: "Cannot create temporary il file" when building First Person C++ Project in UE5.3

I’m encountering an issue while trying to build a First Person C++ project in Unreal Engine 5.3. The build fails with the following error message:

Command line error D8037: cannot create temporary il file; clean temp directory of old il files

I’m using Epic’s default First Person C++ template.

Steps I’ve taken:

  1. I’ve tried cleaning the following directories in my project: Intermediate, DerivedDataCache, and Saved.
  2. Regenerated Visual Studio project files and attempted the build again.
  3. Verified that Visual Studio 2022 is installed with the required workloads:
  • Desktop development with C++
  • Windows 10 SDK (10.0.22621.0)
  1. Ensured enough disk space is available on all drives

The error persists, with multiple lines of the same error for different compile steps. Here’s a snippet of the log:

[3/19] Compile [x64] cl : Command line error D8037 : cannot create temporary il file; clean temp directory of old il files
Error executing C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64\cl.exe (tool returned code: 2)

Greetings @the.akii! Let’s try to figure this one out!

Your issue has been covered in other threads in the community, please test the following solutions for your scenario:

Thank you! Installing Visual Studio on the same drive as Unreal Engine solved the issue.

I reinstalled Visual Studio and UE 5.5 on the same drive but I am still experiencing this issue. Has anyone else had this issue?

[3/30] Compile [x64] cl : Command line error D8037 : cannot create temporary il file; clean temp directory of old il files (0:00.78 at +0:26)
Error executing C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64\cl.exe (tool returned code: 2)
[4/30] Compile [x64] cl : Command line error D8037 : cannot create temporary il file; clean temp directory of old il files (0:01.06 at +0:26)

UnrealBuildTool failed with exit code 0x00000006

1 Like

I uninstalled and re-installed Unreal Engine 5.5 and Visual Studio 2022 Community (same drive again), deleted the saved, Intermediate, .vs, .idea directories in my project folder as well as quit running MalwareBytes AntiVirus software. I then generated visual studio project files, opened my .uproject file using my IDE, cleaned solution and BUILD SUCCESSFUL!

I think it may have been my anti-virus software interfering with the creation of the new files. But I changed a few things around at the same time so its not definitive.

I was able to fix this on ue5.5.1 by setting the all of the Exe files that unreal uses to run as admin(right click exe, select properties, then in compatibility select “run as admin”) as well as the visual studio executable. You might only need to do it on the build tool executable but I did them all just to be sure