Build.bat pointing to the wrong location

So, I’m trying to set up a project with source control. For various reasons, the project file has been set up as a git repository, and is just managing the changes to the files. However, there’s a slight issue. For storage space reasons, I’ve installed UE4 on a second partition to my drive, named D://. The other programmer in our team has only one partition, and has installed it on the main drive, C://. The issue occurs when a project file I’ve made is opened on the other computer. It produces this error:

Error 1 error MSB3073: The command ""D:\Program Files\Unreal Engine\4.3\Engine\Build\BatchFiles\Build.bat" ProjectEditor Win64 DebugGame "C:\Users\***\Documents\Unreal Projects\repo\Project.uproject" -rocket" exited with code 21. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 38 5 Project

This suggests that the project is trying to look for the Build.bat file in the location that I installed UE4 in, which does not exist on the other computer, and thus fails when it doesn’t find it.

My question is quite simple - what can I do to make sure the project looks in the correct location for the Build.bat? I suspect the location is stored in one of the many data files inside the project folder, but I can’t find which one, and I don’t know whether I can just exclude those from the repository.

Some help here would be greatly appreciated!

Hi Hoeloe,

Could you provide some additional information about this issue? I tested this with another staff member (we have the Engine installed on different drives on our computers) and was not able to reproduce the error message that you showed.

  • What version of the Editor are you using?
  • Are you using the binary version installed by the Launcher?
  • What version of Visual Studio are you using?
  • Are you able to reproduce this error using a brand new project created from one of the templates?
  • What are the exact steps that your team member is using when trying to open the project?
  • Can you provide the full output that is shown in Visual Studio?

Please take a look at this post to get some ideas of what additional information would be helpful for us to look into this.

We’re both using UE4.3.1, with Visual Studio 2013 Express.

The error appears to occur regardless of how the project is opened. It seems that a key step in interpreting the project is causing the problem. The full output that is given has been provided - that is the only message that is visible.

As for the exact steps, we have copied a project into a git repository and pushed the entire project to the server (this was mainly to test the git functionality, we will likely filter this down later). The contents of the repository (which is now identical to a project folder) is then pulled to a different machine, and the project opened as normal - upon opening the project, this error occurred. Opening the project was tested both by opening the solution in Visual Studio and compiling the C++, and by opening the uproject file in the editor. Both attempts caused the same error message.

I tried to reproduce this again, and am still not seeing the results that you described. I tried with several projects made from the Blank and Basic Code templates and copied them to different drives and opened them using Engines that are installed on different drives, and they all opened successfully.

Do you run into the same problem if you simply copy the project folder to a different computer instead of going through Git?

I’m not sure. We’ve managed to get around this by reducing what we transferred down to just game content. We’re not really in the position to transfer data directly to test this, as we don’t have physical access to each other’s machines (since we’re working remotely). If I get a to do more tests I will do so, but it seems reducing the transfer to just config files, content, code and the VS solution seemed to work.

I have a similiar problem to this, we’ve found the build path in the project properties under \Intermediate\ProjectFiles\XXX.vcxproj - under the NMakeBuildCommandLine node.

Now all I need to do is sort out if there is a variable that contains the selected Engine install Dir…


Actually - this has already been asked / solved: Set Environment Variable at install - Feedback & Requests - Epic Developer Community Forums