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?

1 Like

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.

2 Likes

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:

16 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.

1 Like

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

Hi, for me adding

bOverrideBuildEnvironment = true;

to both Project.Target.cs and ProjectEditor.Target.cs fixed the issue in 5.4.

7 Likes

I compared my project (upgrade from UE5.1) and new C++ projejct based on UE5.4. Checked for differences in ProjName.Target.cs and ProjNameEditor.Target.cs.

The only difference seems to be DefaultBuildSettings = BuildSettingsVersion.V5;

(mine used to be V2)

It fixes error for me too.

3 Likes


Yeah, I encountered this issue upgrading my custom version of the engine from 5.3 to 4.3.1, and resolved it by:

  1. Uninstalling visual Studio Community 2022 17.9
  2. Installing visual studio community 2022 17.10 preview
  3. Checking “Desktop development with c++”
  4. Checking boxes on the right relevant to “v143 build tools”
1 Like

I second that.

this worked for me too, I have the same problem upgrading a project from 5.2.

thank you

Thanks for this, fixed issue in 5.4

Hey @PatrickDev1! Did you ever find a solution? Did any of these work for you?

Let us know! :slight_smile:

Ok, here what solved the issue for me // 5.4.3 UE Version

6 Likes

Did you uninstall the latest versions?

where can i find this image you posted ?

@ghazou76 Welcome to the forums!

That is the Microsoft Visual Studio Installer. :slight_smile:

You can find it on Google instantly, or if you do a search in your start menu (Windows only) you may find it through there even quicker!

When you start it you can click Modify to modify your installation: