BUILD FAILED IN UNREAL 5.4

Hello I tried to compile a project in unreal 5.4 preview but I get this error and no and it fails in build compilation
Output Log:
Running AutomationTool…
Using bundled DotNet SDK version: 6.0.302
Starting AutomationTool…
Parsing command line: -ScriptsForProject=“E:/Unreal Engine 5/My Proyects/PTU/PTU.uproject” BuildCookRun -project=“E:/Unreal Engine 5/My Proyects/PTU/PTU.uproject” -noP4 -clientconfig=Development -serverconfig=Development -nocompile -nocompileeditor -installed -unrealexe=“C:\Program Files\Epic Games\UE_5.4\Engine\Binaries\Win64\UnrealEditor-Cmd.exe” -utf8output -platform=Win64 -build -cookonthefly -ddc=InstalledDerivedDataBackendGraph -stage -deploy -cmdline=" -Messaging" -device=Windows@PATRICIORAMOS -addcmdline="-SessionId=75ED81C54905A783DE050C9973F72C7A -SessionOwner=‘ramos’ -SessionName=‘PATRICIORAMOS’ " -run
Initializing script modules…
Total script module initialization time: 0.33 s.
Using C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe
Executing commands…
Setting up ProjectParams for E:\Unreal Engine 5\My Proyects\PTU\PTU.uproject
********** BUILD COMMAND STARTED **********
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” PTU Win64 Development -Project=“E:\Unreal Engine 5\My Proyects\PTU\PTU.uproject” -Manifest=“E:\Unreal Engine 5\My Proyects\PTU\Intermediate\Build\Manifest.xml” -remoteini=“E:\Unreal Engine 5\My Proyects\PTU” -skipdeploy -log=“C:\Users\ramos\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.4\UBT-PTU-Win64-Development.txt”
Log file: C:\Users\ramos\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.4\UBT-PTU-Win64-Development.txt
Using ‘git status’ to determine working set for adaptive non-unity build (E:\Unreal Engine 5\My Proyects\PTU).
Creating makefile for PTU (.uproject file is newer)
Available x64 toolchains (1):

  • C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519
    (Family=14.39.33519, FamilyRank=5, Version=14.39.33523, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64)
    Visual Studio 2022 compiler version 14.39.33523 is not a preferred version. Please use the latest preferred version 14.38.33130
    Available x64 toolchains (1):
  • C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519
    (Family=14.39.33519, FamilyRank=5, Version=14.39.33523, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64)
    Visual Studio 2022 compiler version 14.39.33523 is not a preferred version. Please use the latest preferred version 14.38.33130
    Warning: [Upgrade]
    Warning: [Upgrade] Using backward-compatible build settings. The latest version of UE sets the following values by default, which may require code changes:
    Warning: [Upgrade] CppStandard = CppStandardVersion.Default => Updates C++ Standard to C++20 (Previously: CppStandardVersion.Cpp17).
    Warning: [Upgrade] WindowsPlatform.bStrictConformanceMode = true => Updates MSVC strict conformance mode to true (Previously: false).
    Warning: [Upgrade] bValidateFormatStrings = true => Enables compile-time validation of strings+args passed to UE_LOG. (Previously: false).
    Warning: [Upgrade] Suppress this message by setting ‘DefaultBuildSettings = BuildSettingsVersion.V5;’ in PTU.Target.cs, and explicitly overriding settings that differ from the new defaults.
    Warning: [Upgrade]
    Total execution time: 4.56 seconds
    PTU modifies the values of properties: [ bStrictConformanceMode ]. This is not allowed, as PTU has build products in common with UnrealGame.
    Remove the modified setting, change PTU to use a unique build environment by setting ‘BuildEnvironment = TargetBuildEnvironment.Unique;’ in the PTUTarget constructor, or set bOverrideBuildEnvironment = true to force this setting on.
    Took 4.83s to run dotnet.exe, ExitCode=6
    UnrealBuildTool failed. See log for more details. (c)
    AutomationTool executed for 0h 0m 9s
    AutomationTool exiting with ExitCode=6 (6)
    BUILD FAILED

Hey @PatrickDev1!

As it says here, the issue is your Visual Studio installation. You will need to install the version listed 14.38.33130 and set that as default in order to build!

This is just something that the preview versions are somewhat stuck with- it’s just that, a preview. We do not recommend people build projects with a preview as it will have many bugs that the full release will not. :slight_smile:

I am facing the same problem trying to bring a 5.3 project to 5.4 even with the official 5.4.0 release.
Any hint on how to solve this?

Same problem here. My MSVC seems to be too new (just using the latest VS version, and official UE5.4) :confused:

Which is weird now that I think about it, because 5.3 worked perfectly fine on that version.

Make sure In Project.Target.cs and ProjectEditor.Target.cs
version is set to V5
DefaultBuildSettings = BuildSettingsVersion.V5;

That should fix the problem :slight_smile:

3 Likes

@PatrickDev1 @Cyberglobe @GreenClover

Did any of you try Fiinka’s solution? How’d it go for you all?

Didn’t work unfortunately. I do get a more helpful error either because of this change or because I’ve upgraded to 5.4.1:
“UnrealBuildTool has banned the MSVC 14.39.33519-14.39.99999 toolchains due to compiler issues.”
which lead me to this post:

and this VS issue:
https://developercommunity.visualstudio.com/t/VS-2022-1790-Preview-10-__builtin_arr/10519788

Seems like this problem has already started occurring in UE 5.3.2 but since we are upgrading from 5.3.1 to 5.4 (and 5.4.1) we’ve only noticed it now. The Visual Studio fix is allegedly present in the 17.10 preview version, but installing the 14.38 toolchain (by using the Visual Studio installer Modify Visual Studio workloads, components, & language packs | Microsoft Learn) also “fixes” the issue.

2 Likes

Installing the 14.38 build tools from the VS installer and changing the default build settings to V5 (as explained by Fiinka, in my case I had it set to V2) worked for me, but I got to do both, or the project would not build.

Btw, oddly I didn’t have this problem when converting 2 other projects (all the projects were in UE 5.3.2 and converted to 5.4), these just converted and built normally before and after installing the 14.38 build tools. They also had their default build settings set to V4, which I didn’t change.

whats PTU? did you look into it? if its a plugin try to disable just to test if it continues with build.