Unable to create a C++ Project in UE5 EA

So I’m trying to jump into the coding end of UE5 projects but I simply cannot get it to do so correctly.
I have VS2019, .NET 5.0, ASP.NET Core 3.1, and .NET Core 3.1 installed from Rama and other’s recommendations, but still no dice. All I can figure is that I somehow do not have the correct version of MSVC?

Here is the error I get whenever I try creating a C++ project from the launcher:

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

Running D:/Epic Games/UE_5.0EA/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.exe Development Win64 -Project="E:/[Projects]/MyProject5/MyProject5.uproject" -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Win64 using Manual SDK 10.0.18362.0
Creating makefile for MyProject5Editor (no existing makefile)
@progress push 5%
Parsing headers for MyProject5Editor
  Running UnrealHeaderTool "E:\[Projects]\MyProject5\MyProject5.uproject" "E:\[Projects]\MyProject5\Intermediate\Build\Win64\MyProject5Editor\Development\MyProject5Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -abslog="C:\Users\killz\AppData\Local\UnrealBuildTool\Log_UHT.txt" -installed
Reflection code generated for MyProject5Editor in 9.708888 seconds
@progress pop
Building MyProject5Editor...
Using Visual Studio 2019 14.24.28316 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.24.28314) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
[Adaptive Build] Excluded from MyProject5 unity file: MyProject5.cpp, MyProject5GameModeBase.cpp
Building 9 actions with 24 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
  D:\Epic Games\UE_5.0EA\Engine\Source\Runtime\Core\Public\Traits/IsContiguousContainer.h(6): fatal error C1083: Cannot open include file: 'initializer_list': No such file or directory

And when in VS, this is what I get:

Build started...
1>------ Skipped Build: Project: UE5, Configuration: BuiltWithUnrealBuildTool Win64 ------
1>Project not selected to build for this solution configuration 
2>------ Build started: Project: MyProject5, Configuration: Development_Editor x64 ------
2>'"D:\Epic Games\UE_5.0EA\Engine\Build\BatchFiles\GetDotnetPath.bat"' is not recognized as an internal or external command,
2>operable program or batch file.
2>Win64 using Manual SDK 10.0.18362.0
2>Building MyProject5Editor...
2>Using Visual Studio 2019 14.24.28316 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.24.28314) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
2>[Adaptive Build] Excluded from MyProject5 unity file: MyProject5.cpp, MyProject5GameModeBase.cpp
2>Building 8 actions with 24 processes...
2>  [1/8] SharedPCH.Engine.ShadowErrors.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30037\include\yvals_core.h(541): fatal error C1189: #error:  STL1001: Unexpected compiler version, expected MSVC 19.29 or newer.
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(45,5): error MSB3073: The command ""D:\Epic Games\UE_5.0EA\Engine\Build\BatchFiles\Build.bat" MyProject5Editor Win64 Development -Project="E:\[Projects]\MyProject5\MyProject5.uproject" -WaitMutex -FromMsBuild" exited with code 6.
2>Done building project "MyProject5.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========

“Unexpected compiler version, expected MSVC 19.29 or newer” ? Even after I updated everything made sure I had installed the correct modules?

Please help!

Still can’t get this project to initially compile. Any and all help appreciated!

You can try changing your VS installation with the VS installer, under the C++ section you can find the various MSVC versions, I just built successfully and my VS is using MSVC v142 x64/86, also make sure to have the profiling tools, Windows 10 SDK, and Unreal Engine Installer checked in the game development with C++ sections as well, hopefully this helps.

I am having the same exact issue.

Hi @Zharay
There is a known problem copied over UE4, basically, UE4, won’t build on vs2019 with having VS2017 installed.

I have converted UE5EA to work with VS2019 and eventually VS2022 Preview.
Another poster has bought this to my problem to my attention.
If you read the post Visual Studio 2022 Preview is 64 bit and compiles and runs UE 5.0 EA approximately 20% FASTER - Development Discussion / Unreal Engine 5 Early Access - Unreal Engine Forums

UE50EA creating templates will generate and executes a BP C++ template using VS2019 and eventually when tested by other developers, will upgrade to VS2022 Preview.

I am an indie developer so there is no timeline for implementing the VS2022 BP C++ version, just test the VS2019 version, which is a great improvement on UE4 2017

I have had progress with removing requirements for the VS2017/VS2015 to be installed.

I WILL NOT be backporting to UE4

I believe I once had this problem with UE4 when I still had VS2017 installed but I’ve long since gotten rid of it. Tried it again with VS2022 Preview 2 and still get the same results. I’ll be trying your branch out to see if I get anything out of it but honestly this feels like there is some reference to an older install that should’ve been removed properly.

I’d completely remove and reinstall visual studio if it wasn’t being used for work (deadlines)

So I tried your VS2022 project changes and lo it does indeed compile and run! So you and my own assumption were correct. It’s still using older libraries to build UE5, despite there being newer libraries available.

Now we have a problem. Sure UE5 will be out by the time VS2022 is available, but its going to be “native” to VS2019. I hope you push your changes to the Engine devs so that it’s supported on their end as well!

Hi @Zharay ,
The good news is that VS2022 has just gone into the UE5-main repository see line 452 etc. UnrealEngine/VCEnvironment.cs at ue5-main · EpicGames/UnrealEngine (github.com). it is NOT in Early Access, there is talk that ue5-main is unstable. it would be good to load it and test it to see how it compares with my repository.
The bad news is that ue5-main. Won’t build without vs2019 installed and even when installed, will not correctly produce C++ projects for VS2022

Binding IntelliSense data… 100%
Writing project files…
WARNING: No Visual C++ installation was found. Please download and install Visual Studio 2019 with C++ components.
Writing project files… 96%
ERROR: Unable to find C++ toolchain for VisualStudio2019

GenerateProjectFiles ERROR: UnrealBuildTool was unable to generate project files.

Press any key to continue . . .

Do you also have Visual Studio 2017 installed along with 2019?

@Jimbohalo10 I had VS2019 and VS2022 installed on my system (never 2017 since I got this system)

My UE4 plugins refused to build because it demanded VS2017 be present. After a few projects caused UE4 to crash as the project files were being recreated for 19 and 22 I finally decided to delete 2019 and stick with only 2022

My UE4 project still demanded VS2017 so I decided to try the code in UE5… which refused to build because it wanted VS2019. So I reinstalled VS2019 and removed VS2022 instead… but now UE5 won’t build for Windows unless I have Android SDKs installed (???)

So today I see there is a new version of 4.27 available so I install the update and try to build my code again. Now it no longer complains about needing 2017 but now it complains about needing VS2022 :man_facepalming::man_facepalming::man_facepalming:

So I say “to hell with it” and I find the Android stuff where it got installed via Unity and I told UE5 “This is the path inside the Unity folder where you can find all the Android SDKs and NDK, and Java etc. Now build my bloody Windows-only plugin already!”

Now UE5 happily builds for Windows… until “IsContiguousContainer.h(6,10): fatal error: ‘initializer_list’ file not found”

So based on what I read above, are you saying that I should not only install VS2019 but I must install a specific BUILD of VS2019?
But it also sounds like you are saying UE5 uses 2019 for BP projects and 2022 for C++ projects? Is that correct?
In my case it is building my C++ plugin (for WIndows platform only) using VS2019 only (as long as I have the Android SDKs installed) so I am a little (read: completely] lost.

What should I do to get UE5 to compile my plugin? Get 2 versions of 2019 or just a different version of 2019 or get 2 versions of 2019 AND 2022 or just a specific version of 2019 and a specific version of 2022?

I have been asking all over the internet (including this very forum) “How do I get UE to stop wanting VS2017” and so far not a single person at Epic (or the world) has had any idea. In here you mention you removed dependencies on earlier versions of VS meaning you seem to be the only person on the planet who knows how to do this!

Please, oh my master, tell me: Is this something a n00b like me can do or is this something that requires the skill levels of a master’s master’s master?

The file above only exists in VS2022
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.31.30818\include\initializer_list

You need Windows SDK 10.0.18362.0 which you can select when you install VS2022 to build UE5 follow the instructions in
Visual Studio 2022 Preview is 64 bit and compiles and runs UE 5.0 EA approximately 20% FASTER .

It would appear that UE4.26-4.27 requires VS 2017 to work with anything!.

My repository uses the latest version uses VS2022, to build plugins and package projects.

The official UE5 version will ask for VS2019 until the official release of UE5.* is made.

1 Like

OMG, you mean it isn’t just a simple setting I can set/ i actually HAVE to install 2017 to build in 4.27? Wow! 0.o

I am busy installing your repo now but, man, it is hard to find stuff to delete off my HDD while it is building. It is currently standing at 102Gb and I haven’t even built half the modules yet :frowning:

All I wanted to do was package up 2 .h files and 2 .cpp files and here I am, weeks of struggling later, installing UE5 from source, taking up over 102 Gb and counting… Sheesh :frowning:
EDIT: Total space required to build UE5 = 145Gb! OMG! That is insane! :open_mouth: I truly hope the official launch fixes these issues so I can go back to having a 40Gb install! :open_mouth: OMG!

Now the real question still looms… will your fork actually build a plugin? :open_mouth: lol. So far I have had no luck at all. Even UE4 demanding I install android SDKs in order to build a plugin for Windows only. It would honestly appear that UE is great to use as is but if you think about coding anything custom, don’t. Hopefully your fork will give me better results than the official builds

Thanks for this

Hey again

As you can see, I only have the one SDK installed and yet building still fails :frowning:
I created a new project to let this new UE5 create the project itself so mitigate any chances of errors but, still this…

Something strange I noticed is that everywhere where it prints a version of Vs it prints off VS2022 and yet when you go into the project itself it states “projectname (VS2019)” What’s up with that?

I found the file in question residing here
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include
So I added that to the files path but it still complains that it can’t find it when I try to build the plugin

Hi @JansenSensei,
Your path lengths are too long for UE5. Although they supposedly fixed the error. The problem is that windows will only accept smaller path lengths.
where you have a 42 character path

I have 21 characters, below the limit of 25 characters

Why are you trying to package everything Hololens? I don’t and I have one!.

Set target platforms Win64 only like below, You appear to have All Platforms ticked, untick it and the others leaving.

This is a question I have asked many times before and is the topic of a discussion on a Facebook group i am in. I have everything disabled except windows, EXACTLY like in your screenshot and yet I still had to install Android SDKs because it continues to build for ALL platforms even though I have only Windows selected … so it starts with windows then fails at Android.

I am trying to package up a plugin I created. It consists out of 4 files and yet it has taken me weeks to get it packaged up because of problems like exactly this one. Why does it need Android SDKs when i have only Windows selected as build platform?

the only conclusion I have been able to draw that makes sense is that the build target window from your screenshot only affects cooking / packaging up your entire project but whenever you try to package a plugin only then Unreal just builds for all platform all the time

EDIT: for some reason when I try to build the editor again it complains that some of it’s files are outdated and it fails to build. Go figure. So I deleted everything and was planning on downloading the repo again tonight (was busy with it before my internet bombed out on me) and redoing it all again. This time I will try placing it in a shorter path and seeing if that make any difference. Thanks for the tip ! :+1:

Having said that… When I go into the Platforms menu and tell it to package my project for Windows it builds the package just fine. No missing files, no filenames too long issues, no missing anything. It takes about 20 minutes and then my 4 source files are packaged up into a 129Mb executable including 3rd party dependencies like audio libs etc. All for 4 files that just parse text… Or even for a plugin with 0 files… in fact, a project with 0 files in the Sources folder at all

…then I go into the Plugins window and tell it to package ONLY the plugin and now suddenly I need different versions of VS and now I have missing files and require Android SDKs etc etc etc…

In fact… you can easily duplicate my problem…

  1. Create a new C++ project
  2. Disable all platforms except Windows
  3. Open the plugins window
  4. Create a new Plugin, call it whatever you want
  5. In the plugins window, select your new plugin with 0 extra files added
  6. Click on Package and watch as it builds for all platforms
    … and fails because it can’t find SDKs or files

Hi again @Jimbohalo10

  1. So I just redownloaded the entire repo
  2. built the entire thing in D:\Source\repos\UE5
  3. (making sure I only have the correct Win10 SDK installed on my system),
  4. added the folder to initializer_list to the sources list,
  5. created a new C++ game for Windows desktop without raytracing or starter content
  6. unticked all platforms but Windows
  7. created a new plugin
  8. placed absolutely nothing inside the project or the plugin
  9. tried to build the plugin and again it is complaining about IsContiguousContainer.h

So what am I doing wrong here? :frowning:

Hi @JansenSensei, Are you sure you don’t have this file quarantined in a virus checker of something.

I reloaded from my archive and built it fine, my repository is static and cannot be changed. I cannot find the problem on my PC.

I suppose I could go back to an early version, but I don’t see what that proves.

It still seems like a local windows protection problem

I have no idea if Windows has quarantined specific source files from VS. I just reinstalled it a few days ago and didn’t receive any notifications that anything was quarantined…

I was hoping your build would solve this issue but it seems this is an issue that comes from waaaaaaaay back and for all the things you fixed you didn’t fix this one thing :frowning:

Reason why I say that is because a friend of mine tried to build a plugin today also using the standard UE4.26 he installed via the Launcher as well as via the custom source he received to build UE4 for the PS5. In both versions he experienced the same issue as me.

that means UE4.26, 4.27, UE5EA, UE5 your version and UE4 for PS5 on my machine and my friend’s machine halfway across the world. Seems like you are the only person I know of who can actually get any version of UE to build a plugin :frowning:

Anyway, thanks for the help. If I can’t do this the RIGHT way (making a package) then I guess I’ll just do it the EASY way and just copy paste those 4 files into my projects each time… or just migrate them. That should take 10 seconds and NOT fail for 4 weeks using 3 versions of VS across 5 versions of UE over two continents… Plus it will free up 145Gb of space :stuck_out_tongue:

Again, thanks for trying to help

hi @JansenSensei,
Just to clear things up I have reloaded my original UE5 forked repository and built the new Quixel Plugin and it works for UE5. I have no interest in UE4 problems, that’s for Epic to fix

Here is my log
UATHelper: Package Plugin Task (Windows): Running AutomationTool…
UATHelper: Package Plugin Task (Windows): Parsing command line: BuildPlugin -Plugin=C:/Users/Owner/source/repos/UE50/Engine/Plugins/Bridge/Bridge.uplugin -Package=“D:/Users/Owner/Documents/Unreal Projects/BridgePlugin/Bridge” -CreateSubFolder -nocompile
UATHelper: Package Plugin Task (Windows): Found Visual Studio installation: C:\Program Files\Microsoft Visual Studio\2022\Preview (Product=Microsoft.VisualStudio.Product.Community, Version=17.1.31911.260)
UATHelper: Package Plugin Task (Windows): Found Visual Studio installation: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community (Product=Microsoft.VisualStudio.Product.Community, Version=16.11.31624.102)
UATHelper: Package Plugin Task (Windows): TryGetMsBuildPath: Visual Studio 2022 installation: C:\Program Files\Microsoft Visual Studio\2022\Preview
UATHelper: Package Plugin Task (Windows): Copying 369 file(s) using max 64 thread(s)
UATHelper: Package Plugin Task (Windows): Reading plugin from D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\Plugins\Bridge\Bridge.uplugin…
UATHelper: Package Plugin Task (Windows): Building plugin for host platforms: Win64
UATHelper: Package Plugin Task (Windows): Running: C:\Users\Owner\source\repos\UE50\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe UnrealEditor Win64 Development -Project=“D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\HostProject.uproject” -plugin=“D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\Plugins\Bridge\Bridge.uplugin” -iwyu -noubtmakefiles -manifest=“D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\Saved\Manifest-UnrealEditor-Win64-Development.xml” -nohotreload -log=“C:\Users\Owner\source\repos\UE50
UATHelper: Package Plugin Task (Windows): Win64 using Manual SDK 10.0.18362.0
UATHelper: Package Plugin Task (Windows): Using ‘git status’ to determine working set for adaptive non-unity build (C:\Users\Owner\source\repos\UE50).
LogSlate: Took 0.005832 seconds to synchronously load lazily loaded font ‘…/…/…/Engine/Content/Editor/Slate/Fonts/FontAwesome.ttf’ (139K)
UATHelper: Package Plugin Task (Windows): Found Visual Studio installation: C:\Program Files\Microsoft Visual Studio\2022\Preview (Product=Microsoft.VisualStudio.Product.Community, Version=17.1.31911.260)
UATHelper: Package Plugin Task (Windows): Found Visual Studio installation: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community (Product=Microsoft.VisualStudio.Product.Community, Version=16.11.31624.102)
UATHelper: Package Plugin Task (Windows): line 460 Create Entry VCEnvironment.cs: Compiler= VisualStudio2022
UATHelper: Package Plugin Task (Windows): line 460 Create Entry VCEnvironment.cs: Compiler= VisualStudio2022
UATHelper: Package Plugin Task (Windows): line 460 Create Entry VCEnvironment.cs: Compiler= VisualStudio2022
UATHelper: Package Plugin Task (Windows): Parsing headers for UnrealEditor
UATHelper: Package Plugin Task (Windows): Running UnrealHeaderTool “D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\HostProject.uproject” “D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\Intermediate\Build\Win64\UnrealEditor\Development\UnrealEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog=“C:\Users\Owner\source\repos\UE50\Engine\Programs\AutomationTool\Saved\Logs\UHT-UnrealEditor-Win64-Development.txt”
UATHelper: Package Plugin Task (Windows): Reflection code generated for UnrealEditor in 23.9650457 seconds
UATHelper: Package Plugin Task (Windows): Writing manifest to D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\Saved\Manifest-UnrealEditor-Win64-Development.xml
UATHelper: Package Plugin Task (Windows): Building UnrealEditor…

UATHelper: Package Plugin Task (Windows): Using Visual Studio 2022 14.29.30133 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).

UATHelper: Package Plugin Task (Windows): Building 9 actions with 12 processes…
UATHelper: Package Plugin Task (Windows): [1/9] Module.MegascansPlugin.gen.cpp
UATHelper: Package Plugin Task (Windows): [2/9] Module.Bridge.gen.cpp
UATHelper: Package Plugin Task (Windows): [3/9] Module.Bridge.cpp
UATHelper: Package Plugin Task (Windows): [4/9] UnrealEditor-Bridge.lib
UATHelper: Package Plugin Task (Windows): Creating library D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\Plugins\Bridge\Intermediate\Build\Win64\UnrealEditor\Development\Bridge\UnrealEditor-Bridge.lib and object D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\Plugins\Bridge\Intermediate\Build\Win64\UnrealEditor\Development\Bridge\UnrealEditor-Bridge.exp
UATHelper: Package Plugin Task (Windows): [5/9] Module.MegascansPlugin.cpp
UATHelper: Package Plugin Task (Windows): [6/9] UnrealEditor-MegascansPlugin.lib
UATHelper: Package Plugin Task (Windows): Creating library D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\Plugins\Bridge\Intermediate\Build\Win64\UnrealEditor\Development\MegascansPlugin\UnrealEditor-MegascansPlugin.lib and object D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\Plugins\Bridge\Intermediate\Build\Win64\UnrealEditor\Development\MegascansPlugin\UnrealEditor-MegascansPlugin.exp
UATHelper: Package Plugin Task (Windows): [7/9] UnrealEditor-MegascansPlugin.dll
UATHelper: Package Plugin Task (Windows): Creating library D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\Plugins\Bridge\Intermediate\Build\Win64\UnrealEditor\Development\MegascansPlugin\UnrealEditor-MegascansPlugin.suppressed.lib and object D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\Plugins\Bridge\Intermediate\Build\Win64\UnrealEditor\Development\MegascansPlugin\UnrealEditor-MegascansPlugin.suppressed.exp
UATHelper: Package Plugin Task (Windows): [8/9] UnrealEditor-Bridge.dll
UATHelper: Package Plugin Task (Windows): Creating library D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\Plugins\Bridge\Intermediate\Build\Win64\UnrealEditor\Development\Bridge\UnrealEditor-Bridge.suppressed.lib and object D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\Plugins\Bridge\Intermediate\Build\Win64\UnrealEditor\Development\Bridge\UnrealEditor-Bridge.suppressed.exp
UATHelper: Package Plugin Task (Windows): [9/9] UnrealEditor.target
UATHelper: Package Plugin Task (Windows): Total time in Parallel executor: 21.34 seconds
UATHelper: Package Plugin Task (Windows): Total execution time: 81.97 seconds
UATHelper: Package Plugin Task (Windows): Took 82.13404240000001s to run UnrealBuildTool.exe, ExitCode=0
UATHelper: Package Plugin Task (Windows): Building plugin for target platforms: Android, HoloLens, IOS, Linux, LinuxAArch64, Lumin, TVOS, Win64
UATHelper: Package Plugin Task (Windows): Reading filter rules from D:\Users\Owner\Documents\Unreal Projects\BridgePlugin\Bridge\HostProject\Plugins\Bridge\Config\FilterPlugin.ini

UATHelper: Package Plugin Task (Windows): BUILD SUCCESSFUL
UATHelper: Package Plugin Task (Windows): AutomationTool exiting with ExitCode=0 (Success)

Which IMHO proves that this Repository can build UE5 Plugins

1 Like