Code error when building Unreal Engine 5 Source Code from Visual Studio 2022

Hello!

Preword: I’m a newbie in this and looking to get started out and learn as much as I can.

I’m attempting to build the source code version of UE5 via Visual Studio and I’ve run into an error after building. Up to this point, I’ve followed the setup guides, cloned the git repository to my ‘D:’ drive, run “Setup.bat” and then “GenerateProjectFiles.bat”. Finally, I ran UE5.sln in Visual Studio 2022, set the solution configuration to “Development Editor,” platform to “Win64,” and hit Build on the UE target within the Engine folder.

After the build runs, it comes back with a single failure:

  • Code: MSB3073
  • Desc: The command “…..\Build\BatchFiles\Build.bat - Target=“UnrealEditor Win64 Development” -Target=“ShaderCompileWorker Win64 Development -Quiet” -WaitMutex -FromMsBuild” exited with code 6.
  • File: Microsoft.MakeFile.Targets
  • Line: 44

As far as I could tell from my research, it seems like it’s a mismatch issue between local files and the code’s expected files. The error is popping on the third line of the following code block:

  <Target Name="Build" DependsOnTargets="PrepareForNMakeBuild;ResolveReferences;GetTargetPath;$(PreNMakeBuildTarget)" Returns="$(NMakeManagedOutput)">
    <VCMessage Code="MSB8005" Type="Warning" Arguments="NMakeBuildCommandLine" Condition="'$(NMakeBuildCommandLine)'==''"/>
    <Exec Command="$(NMakeBuildCommandLine)" Condition="'$(NMakeUseOemCodePage)' == 'true' and '$(NMakeBuildCommandLine)'!=''"/>
    <Exec Command="$(NMakeBuildCommandLine)" UseUtf8Encoding="Always" StdErrEncoding="UTF-8" StdOutEncoding="UTF-8" Condition="'$(NMakeUseOemCodePage)' != 'true' and '$(NMakeBuildCommandLine)'!=''"/>
  </Target>

Could anyone offer any guidance on what’s going on here? As far as I can tell I have all of the add-ons for Visual Studio that are required. I also tried to run the .sln file via VS2019, but that showed that the version of VS was incompatible with the project file. Any and all help is appreciated.

1 Like

Solved: The file path that I’d cloned the source code to was too long and the binary couldn’t accept it when it was built. I re-cloned the project to a shorter file path and was able to successfully build!

2 Likes

I have it in the root “e:” and if that is not enough, what do I do? change all routes? are we dumb?

Hey, a newer newbie here. I’m getting the same errors as you. I’m trying to do my research but I still can’t decipher what you meant by re-cloning it to a shorter file path. I think my problem resides in where my code is cloning too, it keeps trying to build it on local storage. But I only have the source code on my external storage. Could you help me out?

how to re-clone my project this please help

What he mean with Re-Cloning is download the source code again and extract it in D: for example. He use the word re-cloning because if you use for example Github Desktop what you doing is Cloning (Copying) the Source from github to your hard drive.

I move it to D: but no use, my project name is FlyFightGMCv2, is project name too long?

Project Name too big ? File Path too big ? I have never seen such a software in my life.