C++ project could not be compiled [Resolved]

When trying to create a C++ project, I receive an error saying The project could not be compiled. When looking through the full message, two lines stick out to me:

Using Visual Studio 2017 14.16.27042 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).

and

C:\Program Files (x86)\Epic Games\UE_5.0EA\Engine\Source\Runtime\Core\Public\Windows/WindowsPlatformCompilerSetup.h(19): error C2338: Visual Studio 2019 v16.4 or greater is required to build Unreal Engine.

So it’s using VS2017 and then telling me VS2019 tools are required. I checked the contents of my C:\Program Files (x86)\Microsoft Visual Studio folder and I have the 2019 build tools installed. So where do I go to configure the engine to use the 2019 build tools?

Also, here is the full error message in case there’s something else I’m missing:

The project could not be compiled. Would you like to open it in Visual Studio Code?

Running C:/Program Files (x86)/Epic Games/UE_5.0EA/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.exe Development Win64 -Project="C:/Users/Daniel/Documents/Unreal Projects/MyProject/MyProject.uproject" -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Win64 using Manual SDK 10.0.18362.0
Creating makefile for MyProjectEditor (no existing makefile)
@progress push 5%
Parsing headers for MyProjectEditor
  Running UnrealHeaderTool "C:\Users\Daniel\Documents\Unreal Projects\MyProject\MyProject.uproject" "C:\Users\Daniel\Documents\Unreal Projects\MyProject\Intermediate\Build\Win64\MyProjectEditor\Development\MyProjectEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -abslog="C:\Users\Daniel\AppData\Local\UnrealBuildTool\Log_UHT.txt" -installed
Reflection code generated for MyProjectEditor in 8.3043473 seconds
@progress pop
Building MyProjectEditor...
Using Visual Studio 2017 14.16.27042 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
[Adaptive Build] Excluded from MyProject unity file: MyProject.cpp, MyProjectGameModeBase.cpp
Building 9 actions with 8 processes...
  @progress 'Compiling C++ source code...' 0%
  @progress 'Compiling C++ source code...' 11%
  [1/9] Default.rc2
  @progress 'Compiling C++ source code...' 22%
  [2/9] SharedPCH.Engine.ShadowErrors.cpp
  C:\Program Files (x86)\Epic Games\UE_5.0EA\Engine\Source\Runtime\Core\Public\Windows/WindowsPlatformCompilerSetup.h(19): error C2338: Visual Studio 2019 v16.4 or greater is required to build Unreal Engine.
  C:\Program Files (x86)\Epic Games\UE_5.0EA\Engine\Source\Runtime\Engine\Classes\Animation/AnimSequence.h(435): warning C4996: 'UAnimSequenceBase::MarkRawDataAsModified': MarkRawDataAsModified has been deprecated, any (Raw Data) modification should be applied using the UAnimDataController API instead. This will handle updating the GUID instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
  C:\Program Files (x86)\Epic Games\UE_5.0EA\Engine\Source\Runtime\Engine\Classes\Animation/AnimSequenceBase.h(221): note: see declaration of 'UAnimSequenceBase::MarkRawDataAsModified'

Same problem and i’m using VS2019 v16.10.0
EDIT:
Solved, is the old dear friend BuildConfiguration.xml file, deleted it and all compiled well.

4 Likes

Thank you for letting me know about the BuildConfiguration.xml file in Appdata. I didn’t delete it, but I changed VisualStudio2017 to VisualStudio2019 in it and it worked.

Hi,
I only have VisualStudio2019 installed.
Where and how did you change from VisualStudio2017 to VisualStudio2019?

thank u, resolved my issue.I upgrade engine from 4.23 to 5.0,the config at C:\Users<user>\AppData\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml is higher priority

1 Like

Sorry to resurrect this thread, but I am experiencing the same issue, however there is no \Unreal Engine folder in the AppData\Roaming folder…

1 Like