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?

This is what fixed it for me, for anyone else playing along from home:

  • Install ‘MSVC v143 - VS 2022 C++ x64/x86 Build Tools (v14.34-17.4)(Out of Support)’. Remove all other build tool versions.
  • Install Windows 11 SDK (10.0.22621.0). Remove all other versions of Windows 10/11 SDK.
  • Edit BuildConfiguration.xml to manually specify the CompilerVersion and WindowsSdkVersion.
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
  <WindowsPlatform>
    <CompilerVersion>14.34.31933</CompilerVersion>
	<WindowsSdkVersion>10.0.22621.0</WindowsSdkVersion>
  </WindowsPlatform>
</Configuration>
  • Then delete the UE5.1 source folder entirely. Start fresh. Redownload from GitHub, run Setup.bat, GenerateProjectFiles.bat.
  • Build in VS2022.