# Building Source, GenerateProjectFiles.bat fails

**URL:** <https://forums.unrealengine.com/t/building-source-generateprojectfiles-bat-fails/278157>\
**Category:** Platform & Builds\
**Tags:** error-building, unreal-engine, build-failed, CPP, question\
**Created:** [March 24, 2014, 1:11am UTC](https://forums.unrealengine.com/t/building-source-generateprojectfiles-bat-fails/278157 "2014-03-24T01:11:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_f54268a3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f54268a3](https://forums.unrealengine.com/u/anonymous_user_f54268a3)\
**Post date:** [March 24, 2014, 1:11am UTC](https://forums.unrealengine.com/t/building-source-generateprojectfiles-bat-fails/278157/1 "2014-03-24T01:11:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sialtam\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sialtam\_1](https://forums.unrealengine.com/u/sialtam_1)\
**Post date:** [March 24, 2014, 1:52am UTC](https://forums.unrealengine.com/t/building-source-generateprojectfiles-bat-fails/278157/2 "2014-03-24T01:52:42Z")

</div>

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](https://answers.unrealengine.com/questions/12757/error-cannot-find-atlbaseh-when-compiling-in-vs201.html)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f54268a3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f54268a3](https://forums.unrealengine.com/u/anonymous_user_f54268a3)\
**Post date:** [March 24, 2014, 1:56am UTC](https://forums.unrealengine.com/t/building-source-generateprojectfiles-bat-fails/278157/3 "2014-03-24T01:56:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sialtam\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sialtam\_1](https://forums.unrealengine.com/u/sialtam_1)\
**Post date:** [March 24, 2014, 2:24am UTC](https://forums.unrealengine.com/t/building-source-generateprojectfiles-bat-fails/278157/4 "2014-03-24T02:24:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f54268a3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f54268a3](https://forums.unrealengine.com/u/anonymous_user_f54268a3)\
**Post date:** [March 24, 2014, 2:27am UTC](https://forums.unrealengine.com/t/building-source-generateprojectfiles-bat-fails/278157/5 "2014-03-24T02:27:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sialtam\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sialtam\_1](https://forums.unrealengine.com/u/sialtam_1)\
**Post date:** [March 24, 2014, 2:54am UTC](https://forums.unrealengine.com/t/building-source-generateprojectfiles-bat-fails/278157/6 "2014-03-24T02:54:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f54268a3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f54268a3](https://forums.unrealengine.com/u/anonymous_user_f54268a3)\
**Post date:** [March 24, 2014, 3:31am UTC](https://forums.unrealengine.com/t/building-source-generateprojectfiles-bat-fails/278157/7 "2014-03-24T03:31:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f54268a3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f54268a3](https://forums.unrealengine.com/u/anonymous_user_f54268a3)\
**Post date:** [March 24, 2014, 4:02am UTC](https://forums.unrealengine.com/t/building-source-generateprojectfiles-bat-fails/278157/8 "2014-03-24T04:02:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hbiblia](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hbiblia/32/591965_2.png) [@hbiblia](https://forums.unrealengine.com/u/hbiblia)\
**Post date:** [March 24, 2014, 4:09am UTC](https://forums.unrealengine.com/t/building-source-generateprojectfiles-bat-fails/278157/9 "2014-03-24T04:09:09Z")

</div>

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

> **[Msbuld no se reconoce (msbuild not recognized)](https://forums.unrealengine.com/questions/15598/msbuld-no-se-reconoce.html)**
>
> “msbuild” no se reconoce como un comando interno o externo? \[google traductor\] “msbuild” is not recognized as an internal or external command? I have installed “VS Express 2013 para escritorio”
