This post helped me to solve this error:
[Solved]UE5 5.0 GitHub Source Build Error: C2766, MSB3073 - Programming & Scripting / C++ - Epic Developer Community Forums (unrealengine.com)
Updated steps for building 5.3.2 tag with Visual Studio 2022:
- In Visual Studio Installer, Modify Visual Studio 2022 to add (if any missing) the following under Individual Components tab:
- MSVC v143 - VS 2022 C++ ARM build tools (Latest)
- MSVC v143 - VS 2022 C++ ARM Spectre-mitigated libs (Latest)
- MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)
- MSVC v143 - VS 2022 C++ x64/x86 ARM Spectre-mitigated libs (Latest)
Note: Even though my machine is x64/x86, I enabled ARM tools as well.
-
Move the source code base folder UnrealEngine to "C:".
-
Open UE5.sln and in the solution explorer, right click the project UE5 and do “Rebuild”.
Then the whole build is successfull!