Build issue: The command Build.bat exited with code 6.

I’m trying to build UE4.27 with Visual Studio 2022 but I keep getting the error The command "..\..\Build\BatchFiles\Build.bat -Target="UE4Editor Win64 Development" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild" exited with code 6.

I’ve tried on multiple machines with no avail. Does anyone know what even causes this?

Thanks

Followup, I tried building the whole solution and I get these too


Same problem on UE 5.1.1

I managed to fix it by simply changing the build tools used from VS2019 build tools to the native VS2022 build tools

1 Like