Build.bat fails with exit code 6

2>Parsing headers for MyProjectEditor
2>  Running Internal UnrealHeaderTool "C:\Users\u275713\Documents\Unreal Projects\MyProject\MyProject.uproject" "C:\Users\u275713\Documents\Unreal Projects\MyProject\Intermediate\Build\Win64\MyProjectEditor\DebugGame\MyProjectEditor.uhtmanifest" -WarningsAsErrors -installed
2>Total of 0 written
2>Reflection code generated for MyProjectEditor in 1.3765152 seconds
2>Building MyProjectEditor...
2>Using Visual Studio 2022 14.36.32548 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532) and Windows 10.0.26100.0 SDK (C:\Program Files (x86)\Windows Kits\10).
2>Determining max actions to execute in parallel (6 physical cores, 12 logical cores)
2>  Executing up to 6 processes, one per physical core
2>  Requested 1.5 GB memory per action, 7.61 GB available: limiting max parallel actions to 5
2>Distributing 19 actions to XGE
2>UnrealBuildTool Compile
2>
2>Maximum number of concurrent builds reached.
2>Total time in XGE executor: 0.21 seconds
2>Total execution time: 5.18 seconds
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command ""C:\Program Files\Epic Games\UE_5.3\Engine\Build\BatchFiles\Build.bat" MyProjectEditor Win64 DebugGame -Project="C:\Users\u275713\Documents\Unreal Projects\MyProject\MyProject.uproject" -WaitMutex -FromMsBuild" exited with code 6.
2>Done building project "MyProject.vcxproj" -- FAILED.
========== Build: 1 succeeded, 1 failed, 9 up-to-date, 0 skipped ==========
========== Build completed at 1:38 PM and took 09.066 seconds ==========

Hello, I’m trying to build a (blank) unreal engine project which doesn’t work consistently. I’ve looked at similar posts.

Build.bat fails exited with code 6 - Programming & Scripting / C++ - Epic Developer Community Forums
Errors on UE 5.1 compilation - Development / Getting Started & Setup - Epic Developer Community Forums

I’ve

  • Closed the editor, and only trying to compile on the IDE. (same error)
  • rebuild in IDE with the /binary/ folder deleted which compiles BUT the unreal editor doesn’t work
    which Creates the following error:
The following modules are missing or built with a different engine version:

  MyProject
  VisualStudioTools
  VisualStudioBlueprintDebuggerHelper

Would you like to rebuild them now?

Any advice?

Hello there @Vee_Nguyen!

I think you are in the right track here, I would re-attempt the build, but deleting Intermediate and DerivedDataCache, besides Binaries, which you already tested. Once all three folders are deleted, re-generate project files, and try again.

As well, considering that error message you received, please make sure that your current setup between UE and VS has the correct versions installed, and that all elements are included, following the guide below:

If all addons are installed correctly, then another option would be to uninstall Visual Studio, perform a clean install according to your UE version, then test again.