Build from (Clean) Source Error

Trying to build the editor from a clean fork/clone of the UE5 source (release branch). This is the 5th attempt of deleting, re-forking and re-cloning. Each time gives the same error:

|07:11:05:921|8>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command ..\..\Build\BatchFiles\Build.bat -Target=UnrealEditor Win64 Development -Target=ShaderCompileWorker Win64 Development -Quiet -WaitMutex -FromMsBuild exited with code 6.|
|---|---|
|07:11:05:921|8>Done building project UE5.vcxproj -- FAILED.|

Any ideas as to what could be causing this?

Greetings @valehntyn

There was another post with someone having this same issue that I came across here. Take a look there and see if this is the same issue. If it resolves the problem let me know. If not, we can dig deeper into the problem!

Hey, thank you for the reply. I can confirm that I followed all the steps to set up VS correctly and the file is in my root directory, with no file spaces (my filepath is: C:\UnrealEngine\UE5.sln). I have the build settings as development editor, win64. I’ve tried re-forking, re-cloning, cloning directly from epic’s repo without forking, cleaning and building, rebuilding, and turning on and off various compiler options, in various configurations. Here is my current compiler/VS configuration:

here is a paste of the output log when attempting to build the project (after the intial failed build)
https://pastebin.com/raw/qP2VmQwQ

the line referenced in the error is:

<Exec Command="$(NMakeBuildCommandLine)" Condition="'$(NMakeUseOemCodePage)' == 'true' and '$(NMakeBuildCommandLine)'!=''"/>

both setup and generate project files ran/run without issue, and even now, trying to rerun setup there are no additional dependancies trying to be downloaded.

I recommend uninstall all those Windows SDK a leave only 1 , 10.0.18362 or 10.0.19041.
Here is my .NETs

Thank you for the suggestion, unfortunately I’m still having the same error with these changes.

Adding the code

CppStandard = CppStandardVersion.default;

to all 4 target.cs files in …/Engine/Source resolved the issue.

Doing this throws the error, “identifier expected” but I don’t see why. Is there something I was supposed to include? I am in the constructor and there are no red squiggles.

change it to

CppStandard = CppStandardVersion.Default;

the problem lower default has no call