Trying to build a project using VS2022 in UE5 and getting this error...

Check these:

  • Make sure to set as startup your project folder:

  • Verify with Visual Studio Installer, you have all the required sdk for unreal to work.

  • Close unreal, and build from visual studio.