build failed ue5.1.1 running windows 10

hi guys.
spend this vacation designing a game. today i wanted to package and test run the game.
but no matter what i try the building fails.

this error code:
UATHelper: Packaging (Windows): Building fayegame…
UATHelper: Packaging (Windows): Using Visual Studio 2022 14.44.35213 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
UATHelper: Packaging (Windows): [Upgrade]
UATHelper: Packaging (Windows): [Upgrade] Using backward-compatible include order. The latest version of UE has changed the order of includes, which may require code changes. The current setting is:
UATHelper: Packaging (Windows): [Upgrade] IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_0
UATHelper: Packaging (Windows): [Upgrade] Suppress this message by setting ‘IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;’ in fayegame.Target.cs.
UATHelper: Packaging (Windows): [Upgrade] Alternatively you can set this to ‘EngineIncludeOrderVersion.Latest’ to always use the latest include order. This will potentially cause compile errors when integrating new versions of the engine.
UATHelper: Packaging (Windows): [Upgrade]
UATHelper: Packaging (Windows): Determining max actions to execute in parallel (12 physical cores, 24 logical cores)
UATHelper: Packaging (Windows): Executing up to 12 processes, one per physical core
UATHelper: Packaging (Windows): Building 4 actions with 4 processes…
UATHelper: Packaging (Windows): [1/4] WriteMetadata fayegame.target cancelled
UATHelper: Packaging (Windows): [2/4] Link fayegame.exe cancelled
UATHelper: Packaging (Windows): [3/4] Compile SharedPCH.Core.ShadowErrors.InclOrderUnreal5_0.cpp
UATHelper: Packaging (Windows): Detected compiler newer than Visual Studio 2022, please update min version checking in WindowsPlatformCompilerSetup.h
UATHelper: Packaging (Windows): C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(29): error C4668: ‘__has_feature’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
UATHelper: Packaging (Windows): C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(29): error C4067: unexpected tokens following preprocessor directive - expected a newline
UATHelper: Packaging (Windows): [4/4] Compile fayegame.cpp cancelled
UATHelper: Packaging (Windows): Took 2.961368s to run dotnet.exe, ExitCode=6
UATHelper: Packaging (Windows): UnrealBuildTool failed. See log for more details. (C:\Users\robbert\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.1\UBT-fayegame-Win64-Development.txt)
UATHelper: Packaging (Windows): AutomationTool executed for 0h 0m 4s
UATHelper: Packaging (Windows): AutomationTool exiting with ExitCode=6 (6)
UATHelper: Packaging (Windows): BUILD FAILED
PackagingResults: Error: Unknown Error

my pc is running on windows 10 . with the ue 5.1.1 engine.
Windows SDK 10.0.18362 is installed.

i can package the third person map (default start map) without any issues.
when loading the real game the build fails.

what can i try more?
been searching forums and tested a lot of things but to no prevail.

hope some expert can help me out on this one

with kind regards
robbert lievens

Hello there @robbertlievens!

Checking through your log, there are multiple version conflicts of different elements in your build. VS 2022 is newer than UE5.1.1, and your SDK should be at least 10.0.19041.

In order to resolve the mismath, you can either update UE to 5.3, or downgrade VS to version 17.2, using the release history site:

Still, I would suggest re-checking and re-installling all elements from your setup, with the proper versions for your project, using Epic’s documentation here:

Once you have installed all proper versions, you will need to clear and rebuild your project’s cache, with the following steps:

  • Close UE
  • Delete these folders in your main directory:
    • Binaries/
    • Intermediate/
    • .vs/
  • From VS, right-click .uproject > Select “Generate Visual Studio project files”
  • Open .sln > right-click on your game project > Select “Rebuild”
  • Open UE, allow it to rebuild
  • Try packaging again