Visual studio compiler issue while packaging

Hello! I tried to package my project and it failed. It said this:

UATHelper: Packaging (Windows): Log file: C:\Users\jtw26\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.4\UBA-Fight_game-Win64-Shipping.txt
UATHelper: Packaging (Windows): Cleaning Fight_game binaries…
UATHelper: Packaging (Windows): Available x64 toolchains (1):
UATHelper: Packaging (Windows): * C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433
UATHelper: Packaging (Windows): (Family=14.42.34433, FamilyRank=5, Version=14.42.34436, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64)
UATHelper: Packaging (Windows): Visual Studio 2022 compiler version 14.42.34436 is not a preferred version. Please use the latest preferred version 14.38.33130
UATHelper: Packaging (Windows): Took 1.21s to run dotnet.exe, ExitCode=0
UATHelper: Packaging (Windows): Running: C:\Program Files\Epic Games\UE_5.4\Engine\Binaries\ThirdParty\DotNet\6.0.302\windows\dotnet.exe “C:\Program Files\Epic Games\UE_5.4\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” Fight_game Win64 Shipping -Project=C:\Unreal\Projects\Fight_game\Fight_game.uproject -Manifest=C:\Unreal\Projects\Fight_game\Intermediate\Build\Manifest.xml -remoteini=“C:\Unreal\Projects\Fight_game” -skipdeploy -log=“C:\Users\jtw26\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.4\UBA-Fight_game-Win64-Shipping_2.txt”
UATHelper: Packaging (Windows): Log file: C:\Users\jtw26\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.4\UBA-Fight_game-Win64-Shipping_2.txt
UATHelper: Packaging (Windows): Creating makefile for Fight_game (no existing makefile)
UATHelper: Packaging (Windows): Available x64 toolchains (1):
UATHelper: Packaging (Windows): * C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433
UATHelper: Packaging (Windows): (Family=14.42.34433, FamilyRank=5, Version=14.42.34436, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64)
UATHelper: Packaging (Windows): Visual Studio 2022 compiler version 14.42.34436 is not a preferred version. Please use the latest preferred version 14.38.33130
UATHelper: Packaging (Windows): Available x64 toolchains (1):
UATHelper: Packaging (Windows): * C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433
UATHelper: Packaging (Windows): (Family=14.42.34433, FamilyRank=5, Version=14.42.34436, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64)
UATHelper: Packaging (Windows): Visual Studio 2022 compiler version 14.42.34436 is not a preferred version. Please use the latest preferred version 14.38.33130
UATHelper: Packaging (Windows): Writing manifest to C:\Unreal\Projects\Fight_game\Intermediate\Build\Manifest.xml
UATHelper: Packaging (Windows): Building Fight_game…
UATHelper: Packaging (Windows): Using Visual Studio 2022 14.42.34436 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433) and Windows 10.0.26100.0 SDK (C:\Program Files (x86)\Windows Kits\10).
UATHelper: Packaging (Windows): Warning: Visual Studio 2022 compiler is not a preferred version
UATHelper: Packaging (Windows): [Adaptive Build] Excluded from Fight_game unity file: Fight_game.cpp
PackagingResults: Warning: Visual Studio 2022 compiler is not a preferred version
UATHelper: Packaging (Windows): Determining max actions to execute in parallel (6 physical cores, 12 logical cores)
UATHelper: Packaging (Windows): Executing up to 6 processes, one per physical core
UATHelper: Packaging (Windows): Requested 1.5 GB memory per action, 5.73 GB available: limiting max parallel actions to 3
UATHelper: Packaging (Windows): Using Parallel executor to run 5 action(s)
UATHelper: Packaging (Windows): ------ Building 5 action(s) started ------
UATHelper: Packaging (Windows): [1/5] Resource Default.rc2
UATHelper: Packaging (Windows): [2/5] Compile [x64] SharedPCH.Core.Project.ValApi.Cpp20.cpp
UATHelper: Packaging (Windows): C:\Program Files\Epic Games\UE_5.4\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(31): 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.4\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(31): error C4067: unexpected tokens following preprocessor directive - expected a newline
UATHelper: Packaging (Windows): Total time in Parallel executor: 3.84 seconds
UATHelper: Packaging (Windows): Total execution time: 7.34 seconds
UATHelper: Packaging (Windows): Took 7.63s to run dotnet.exe, ExitCode=6
UATHelper: Packaging (Windows): UnrealBuildTool failed. See log for more details. (C:\Users\jtw26\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.4\UBA-Fight_game-Win64-Shipping_2.txt)
UATHelper: Packaging (Windows): AutomationTool executed for 0h 0m 11s
UATHelper: Packaging (Windows): AutomationTool exiting with ExitCode=6 (6)
UATHelper: Packaging (Windows): BUILD FAILED
PackagingResults: Error: Unknown Error

I installed the preffered compiler, and it still gave me the same warning message. My project is blueprint based,

Hi, I believe the issue might be related to the following line: “UATHelper: Packaging (Windows): Visual Studio 2022 compiler version 14.42.34436 is not a preferred version. Please use the latest preferred version 14.38.33130

Try changing this version in the modify tab of VS Installer. Type 14.42 in search, uncheck, and then type 14.38, checking the same installed modules. I do might have more modules installed, however i was struggling with this packaging issue myself and tried a lot of things :smiley:

For me it solved the problem, however I’ve had some new ones that needed adressing

1 Like

It worked for me! Thanks a million!

1 Like

Yep , worked for me too , Thanks , All that other possible solutions i saw and tried , led to more issues and didn’t do it. All was needed was this.