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?
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.
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 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)
Edit:
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 , UPDATE
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.
@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
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?
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
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
EDIT: Total space required to build UE5 = 145Gb! OMG! That is insane! I truly hope the official launch fixes these issues so I can go back to having a 40Gb install! OMG!
Now the real question still looms… will your fork actually build a plugin? 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
As you can see, I only have the one SDK installed and yet building still fails
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?
EDIT:
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
D:/Programs/Unreal/5Source/UnrealEngine-5
I have 21 characters, below the limit of 25 characters
C:/source/repos/ue50
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 !
(TYPO FIX EDIT)
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…
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
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
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
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
\Engine\Programs\AutomationTool\Saved\Logs\UBT-UnrealEditor-Win64-Development.txt”
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).