Unreal 5.1 fails to build from source with MSB3073 error

Build Log error:

8>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(50,5): error MSB3073: The command “…\Build\BatchFiles\Rebuild.bat -Target=“UnrealEditor Win64 Development” -Target=“ShaderCompileWorker Win64 Development -Quiet” -WaitMutex -FromMsBuild” exited with code -1.
8>Done building project “UE5.vcxproj” – FAILED.
========== Rebuild All: 7 succeeded, 1 failed, 0 skipped ==========
========== Rebuild completed at 1:34 PM and took 05:57.722 minutes ==========

Running Visual Studio 2022 (17.14.21)
Windows 11 25H2

Steps:

  1. Download source from github.
  2. Extract.
  3. Run Setup.bat.
  4. GenerateProjectFiles.bat
  5. Launch UE5.sln
  6. Confirmed Solution Configurations is set to ‘Development Editor’ and Solution Platforms is set to ‘Win64’.
  7. Right-click on UE5 and select Build.

Seen plenty similar threads but none of the solutions I’ve seen so far have worked. Tried disabling antivirus but it made no difference. Have all the required VS components; Desktop Development with C++, Game Development with C++, .NET Desktop Development.

It didn’t completely fail, but it did fail to build the Unreal Editor.

What am I missing here?