Download

Solution to GenerateProjectFiles.bat not locating MSbuild.exe

After cloning your fork of the engine to your desired directory and extracting the required files to the UnrealEngine folder, the next step to setting up your build of UE4 is to run the GenerateProjectFiles.bat in the root directory of the engine. I had some issues getting the batch file to find and run msbuild.exe, and the other forum posts I read were somewhat confusing, so I thought it might be helpful to post my solution in case anyone else has the same problem.

This solution makes the assumption that you are using the VS2013 build tools.

  1. Locate your version of MSbuild.exe. Unless you told your computer otherwise at installation time, yours should be at “C:\Program Files (x86)\MSBuild\12.0\Bin\MSbuild.exe”.
  2. Open the folder where you cloned the engine, navigate to “Engine>Build>BatchFiles”, find “GenerateProjectFiles.bat”, right click on it, and select ‘Edit’ from the dropdown menu.
  3. Locate line 57 with the command :ReadyToCompile. On the next line, replace ‘msbuild’ with the explicit filepath pointing to your version of MSbuild.exe. If you couldn’t find that directory in step one, try using the one above.

I hope this is helpful to anyone who encountered this issue.

Have a great day and go build something cool!

  • Alpha Spartan A