Solved: the file path that I'd cloned the source code to was too long. I re-cloned the project to a shorter file path and was able to successfully build. Thank you!
Code error when building Unreal Engine 5 Source Code in 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 Unreal Engine 5 via Visual Studio and I’ve run into an error after building. Up to this point, I've followed Unreal Engine's documentation for setup and installed the files directly from their supported github directory, so I don't see a reason there would be an issue with the code I'm running.
After the build runs, Visual Studio 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, though I'm not super well versed in Visual Studio or C++ and am having a hard time figuring out the cause. The error is popping on the third line of the following code block (bolded):
<Target Name="Build" DependsOnTargets="PrepareForNMakeBuild;ResolveReferences;GetTargetPath;$(PreNMakeBuildTarget)" Returns="$(NMakeManagedOutput)">
<VCMessage Code="MSB8005" Type="Warning" Arguments="NMakeBuildCommandLine" Condition="'$(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 since that's a common one for running Unreal Engine 4, but UE5 doesn't seem to be supported on that version. Thank you!