Building Source, GenerateProjectFiles.bat fails

I forked from GitHub and followed the instructions on the video for building the source. When I run the GenerateProjectFiles.bat in the UnrealEngine folder I get failed to compile error. Here is the console output.

Setting up Unreal Engine 4 project files…
The system cannot find the path specified.
‘msbuild’ is not recognized as an internal or external command,
operable program or batch file.

GenerateProjectFiles ERROR: UnrealBuildTool failed to compile.

Press any key to continue . . .

I do have multiple versions of Visual Studio installed, looking at other threads that seems to be a possible problem.

i had the same kind of problem with my build and find the solution here but to answer you , i need to know if the error has anything to do with altbase.h file? this was the reason for my build error and a simple line of code has solved the problem. go to this page for the answer that helped me [Solved] Error: cannot find atlbase.h when compiling in VS2013 Express? - Programming & Scripting - Epic Developer Community Forums

I tried that, but I don’t get to the point of trying to build it in Visual Studio. It’s the GenerateProjectFile.bat fails.

Have you installed the requiered files before (1 of 2 and 2 of 2) ?

Yes, I installed them. the error seems to be msbuild not recognized.

Then it must be some other problem than what happened to me. Sorry i couldnt help you more :frowning:

I figured out the problem. I have an amd cpu and the paths for the VisualStudio. Changing hte bat file here

\GitHub\UnrealEngine\Engine\Build\BatchFiles\GenerateProjectFiles.bat

line 32 call “%VS120COMNTOOLS%/…/…/VC/bin/x86_amd64/vcvarsx86_amd64.bat” >NUL

I changed to: “C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64_x86\vcvarsamd64_x86.bat” >NUL

Now it generates the Visual Studio files for the Engine SOurce

Edit: That wasn’t quite it. Changing the environmental variable VS120COMNTOOS to point at my VS 2013 tools location worked. I don’t know why it was wrong, I’m assuming it was left over from when I was using hte VS2013 Release Candidate.

I had the same problem, is that the msbuild was moved elsewhere.