Build.bat fails exited with code 6

I was like that too when I started with unreal, I (of course) backed up folders before deleting.
But now I know better; intermediate is not part of your project, it is an (intermediate, duh) product of it. IT IS SAFE TO DELETE, and more than that, it is ABSOLUTELY NOT something you want to include in source control (add it to the .gitignore if you use git/github), similarly, the VS solution (.sln) should also NOT be included in source control.
This may seem a little counter intuitive to anyone used to making other types of projects with VS, but it is how Unreal works - it makes the solution for you, and the intermediate folder is a part of what it does. Sometimes there can be problems because things get out of sync between what has been made in the intermediate folder and what is in your source code… So you delete that intermediate folder, and recreate a new .SLN

Feel comfortable that it IS perfectly fine to delete it, because a properly source controlled project should NEVER have either the .SLN or the intermediate folder in it - they get created, when you first download the project and generate the SLN, and then when you open that solution and start using it (and build, etc)

I even have a .bat file in the project folder which i run to automatically delete things and recreate the solution, because it is something you might need to do occasionally, especially if you are working on a collaborative project using Git where the source code pull can get the solution out of sync with the actual sourcecode you now have.

5 Likes