# C++ project could not be compiled \[Resolved\]

**URL:** <https://forums.unrealengine.com/t/c-project-could-not-be-compiled-resolved/231455>\
**Category:** Character & Animation\
**Tags:** unreal-engine, UE5-0\
**Created:** [May 27, 2021, 4:40am UTC](https://forums.unrealengine.com/t/c-project-could-not-be-compiled-resolved/231455 "2021-05-27T04:40:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigilua](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bigilua](https://forums.unrealengine.com/u/bigilua)\
**Post date:** [May 27, 2021, 4:40am UTC](https://forums.unrealengine.com/t/c-project-could-not-be-compiled-resolved/231455/1 "2021-05-27T04:40:14Z")

</div>

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:

```auto
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'

```

---

<div class="post-metadata">

**Author:** ![ZioYuri78](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zioyuri78/32/1194615_2.png) [@ZioYuri78](https://forums.unrealengine.com/u/ZioYuri78)\
**Post date:** [May 27, 2021, 12:02pm UTC](https://forums.unrealengine.com/t/c-project-could-not-be-compiled-resolved/231455/2 "2021-05-27T12:02:39Z")

</div>

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.

> [@Issue packaging (Resolved)](https://forums.unrealengine.com/t/issue-packaging-resolved/231242/8):
>
> I figured out my particular issue and it’s highly uncommon, but incase someone is in the same boat: At some point, I added C:\Users\\<user\>\AppData\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml and hardcoded the compiler to VisualStudio2017. I did this because of some silly configuration I was figuring out with developing code plugins. Deleting the file worked, and probably is the correct path forward when developing on both UE4 and UE5 targets.

---

<div class="post-metadata">

**Author:** ![bigilua](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bigilua](https://forums.unrealengine.com/u/bigilua)\
**Post date:** [May 27, 2021, 5:25pm UTC](https://forums.unrealengine.com/t/c-project-could-not-be-compiled-resolved/231455/3 "2021-05-27T17:25:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![zgzg2020](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zgzg2020](https://forums.unrealengine.com/u/zgzg2020)\
**Post date:** [February 15, 2022, 4:57pm UTC](https://forums.unrealengine.com/t/c-project-could-not-be-compiled-resolved/231455/4 "2022-02-15T16:57:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sakyaor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sakyaor](https://forums.unrealengine.com/u/Sakyaor)\
**Post date:** [March 7, 2022, 3:56am UTC](https://forums.unrealengine.com/t/c-project-could-not-be-compiled-resolved/231455/5 "2022-03-07T03:56:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![namiredo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@namiredo](https://forums.unrealengine.com/u/namiredo)\
**Post date:** [September 17, 2022, 3:42pm UTC](https://forums.unrealengine.com/t/c-project-could-not-be-compiled-resolved/231455/6 "2022-09-17T15:42:29Z")

</div>

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