Download

Build.bat fails exited with code 6

For the last several months I’ve been building UE source version 4.26 with no problem. Today our company distributed licenses to switch from VS Community 2019 to VS Pro 2019 and so I updated to VS Pro 2019. Doing this caused all my modules to have to be rebuilt. I’ve got the UE4.sln loaded into VS Pro 2019, and when I try to build, everything builds until I get to the end when I get this:

1>Building 5 actions with 8 processes…
1> [1/5] dte80a.tlh
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(45,5): error MSB3073: The command “…\Build\BatchFiles\Build.bat -Target=“UE4Editor Win64 Development” -Target=“ShaderCompileWorker Win64 Development -Quiet” -WaitMutex -FromMsBuild” exited with code 6.
1>Done building project “UE4.vcxproj” – FAILED.

I’ve run Setup.bat and run through all the steps that you do for initial setup that I can think of. Does anyone have any idea what might be the issue or how to debug?

After some googling I’ve found this thread:

Which points out that the command shown in the error has an extra quote mark immediately following the -Quiet option. Any idea how to get rid of that quote?

I found to edit out the extra quote, in Visual Studio open the UE4 project’s property page, and under Configuration Properties select NMake. This will show you a Build Command LIne, Rebuild All Command Line and a Clean Command Line. These can be edited to remove the extra quote.

But that didn’t fix anything for me. (Maybe it will for someone else though)

To fix my error I found this page:

And following the instructions there, I deleted my “Engine\Intermediate\Build\Win64\UE4Editor” folder and did a rebuild. After the delete, my build went fine.