Are you sure it actually compiled with the new toolset? I’m under the impression Unreal Engine doesn’t invoke the compiler through Visual Studio’s settings, rather its invoked via the Unreal Header Tool. You should be able to see what toolset was used in Visual Studio’s Output window near the start of the build.
next time i build i’ll take note of what it says.
This is a carry through from UE 4 where they wanted VS 2015/2017 installed. In UE5 they just changed the line from 2017 to 2019.
Now I will have to fix the problem in my VS2022 Fork.
I will report here when fixed. UE5 BP C++ code generator creates a blank BP C++ in VS2022 correctly.
I am pleased to report successful compilation and running using the new VS2022 Preview 5 RC 1, released 12th October.
The VS 2022 final Launch event is on November 8th 2021
In this test I have used the most complex BP Vehicle Advanced which compiles and runs just like UE5 all you need to do is Control + F5
Here is a picture of the BP C++ build where VS2022 Preview is automatically called WITHOUT any reference to VS2019 as it has been disabled.
Here is a picture of the code running
This is Windows Task manager running the VS2022 P3 BP C++
as an Unreal Editor Binary
Minor Update VS2022 3.1 and 37 patches from the original fork and built and working fine. If you need to Enable Live coding this works with VS2022 Preview 5/RC 1 as well
I have pushed the updates to my repository
git clone https://github.com/jimshalo10/UnrealEngine-5 -b ue5EA-vs2022
Yeah I talked about that in my post the ue5 main crash you have to go back a couple commits for it to work and that has nothing to do with the visual studio version and that’s just epic broke it lol which is something they do kind of often lol
Edit: I was going to inch my way up the commits and try to figure out which one was the last commit that ends up working perfectly fine. Might do that since there haven’t been any commits today
hi @NavJack27 There are more problems than you saw in [ue5-main] . The program won’t generate the ue5.sln.
UPDATE for VS2022 RC1 P5 and UE5-main
I have got it working in
Visual Studio 2022 Preview 7 now builds and runs [ue5-main-vs2022]
During my continuous testing of UE5EA, I have identified a problem with both VS2019 and VS2022 P3. Please don’t use the Right-Click “Find All References”, but instead use the “Find in Files”, “Find All”.
Microsoft Visual Studio Engineering appreciates and is interested in the work on testing UE5EA and this repository.
The summary is that there are approximately over 8500 references to some C++ functions in UE5EA and “Find All References” uses IntelliSense from the version VS2019 16.11. This causes VS2022 P3 to generate 17 extra processes of up to 1GB effectively stopping/ freezing any Windows 10 PC without a 64GB pagefile.sys
I have reported the problem to Microsoft and its “Under Consideration”. I feel this is a good result for UE5EA because it is giving MS VS 2022 Engineering a chance to use UE5 as testing for the final release of UE5 and VS2022.
For those who are want to see the report
Preview 3.1 Enabled all IntelliCode Preview Features very slow/crashes while doing “Find References” - Visual Studio Feedback
My thanks to all of you who have tested this repository
Hi, @Knauric and Everyone reading. This thread. Firstly thank you for using Visual Studio 2022 Preview. Visual Studio 2022 Preview 4 is now out and I have built this UE5EA-vs2022 repository without error.
There are many new features in Preview 4 that will now build the ue5-main repository because it reverts to VS2019 code as a result of the new Intellisense features.
Hi, @Knauric and Everyone reading. This thread. Firstly thank you for using Visual Studio 2022 Preview. On November 8th 2021 will see the release of the production version and no longer in Preview.
VS 2022 Preview 7 Release Candidate 2 builds UE5EA.
I have installed a new version of the Quixel Bridge plugin version 2021.0.4 in my repository. This is the same as the binary version used in the Epic Marketplace Launch app for binary UE5.0 EA2.
I have tested and built this. The problem with Windows Packaging/Cooking is now fixed
Note to Everyone on Unreal Engine builds you must use an NVRAM/SSD to build UE5.
My recent build on a fast IDE hard drives to 26787 seconds 6.45 hours.
The SSD/NVRAM version take 4767 seconds 78 minutes
Preview RC2 now builds 200 seconds faster!
Total time in Parallel executor: 4353.28 seconds:grin:
Visual Studio 2022 won’t be allowed installed on an IDE when an SSD exists.
could you please give me an advice.
- downloaded Ue5 branch from git
- do setup.bat
- GenerateProjectFiles.bat -2022 ( to force create vs 2022 project files )
the specs of my pc:
- win 10
- super fast ssd with 500 gbyte free memory
- ryzen 5900 ( 12 core cpu )
- 16 gbyte RAM
My Problem: compilation of a e.g. debug gameeditor is very slow
e.g. with this build log i can verify that 2022 toolchain is used:
Parsing headers for UnrealEditor
13> Running UnrealHeaderTool UnrealEditor “C:\unreal2\Engine\Intermediate\Build\Win64\UnrealEditor\Debug\UnrealEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog=“C:\unreal2\Engine\Programs\UnrealBuildTool\Log_UHT.txt”
13>Reflection code generated for UnrealEditor in 8,8303405 seconds
13>Creating makefile for ShaderCompileWorker (no existing makefile)
13>Parsing headers for ShaderCompileWorker
13> Running UnrealHeaderTool ShaderCompileWorker “C:\unreal2\Engine\Intermediate\Build\Win64\ShaderCompileWorker\Development\ShaderCompileWorker.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog=“C:\unreal2\Engine\Programs\UnrealBuildTool\Log_UHT.txt”
13>Reflection code generated for ShaderCompileWorker in 0,2307619 seconds
13>Building UnrealEditor and ShaderCompileWorker…
13>Using Visual Studio 2022 14.30.30705 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705) and Windows 10.0.20348.0 SDK (C:\Program Files (x86)\Windows Kits\10).
Determining max actions to execute in parallel (12 physical cores, 24 logical cores)
13> Executing up to 12 processes, one per physical core
13> Requested 1,5 GB free memory per action, 8,11 GB available: limiting max parallel actions to 5
13>Building 5673 actions with 5 processes…
13>[1/5673] Resource Default.rc2
13>[2/5673] Compile MiMalloc.c
13>[3/5673] Compile PCH.Core.cpp
13>[4/5673] Compile SharedPCH.CoreUObject.ShadowErrors.cpp
the compiler reserves 1,5 gbyte per action so only 5 parallel compiling threads are running.
to me this seems very conservative, because the whole time there a serveral gbytes of free ram acording to the resource monitor.
as i see, your pc also has 16 gbyte ram but seems to compile much faster, does your pc use maximul cores you have ?
Compiling time is at least 3 hours, that is so frustrating
Many thanks for every advice you have
You need a large pagefile.sys to make up for the lack of RAM memory
see Can’t create C++ project ( or use C++ ) - Unreal Engine 5 Early Access / Feedback for Unreal Engine 5 Early Access - Unreal Engine Forums
In this case, I used 32GB, but now with the current version you will need 64GB to achieve that speed and make sure the UE5 is on the SSD drive and you drives have been trimmed and fragmented.
thanks for your answer, but sorry no succes.
On my machine, changing the system pagefile, reboot etc. does not change anything, about my problem !
I have ordered a ram extension 32 gbyte ( 2x16 ) then the problem should be solved.
Fragmenting SSDs is a no-no, isn’t it? It’s a problem with HDDs, not SSDs.
Hi Yes yo its trimming SDD and defregement any HDD
No one is using IDE dude. Just call them HDD. Spinning rust uses SATA.
Hi, @Knauric and Everyone reading. This thread. Firstly thank you for using Visual Studio 2022 Preview.
I have just updated VS2022 to Version 17.1.0 Preview 2.0
When loading for the first time there are several warning messages.
The most important is that on the top right under the Solution Explorer is a message saying that the UE5 project is targeting a Net Core version 3.1 which is not installed.
The way to FIX this is to follow the advice and let Visual Studio Installer add the missing Net Core 3.1.
The annoying messages about missing toolsets disappear. Now simply shutdown with the top RHS red x and restart.
This time there aren’t any messages and in a few seconds, you are ready to start work.
Update 16th January 2022
When trying to “Build Lighting” you must now “MANUALLY” build UnrealLightmass.exe in UE5.0 in Solution explorer scroll down to programs right click on UnrealLightmass and select “Build” the output log will show about 89 files being compiled with UnrealLightmass.exe as the final.
Restart UE5 and the project and when you try “Build Lighting” there will be a build log, not an error log.
Local builds are very quick compared with Swarm remote builds, but you much enable this in Swarm Settings tab.
Hi . I’m new on Visual Studio 2022 and I need your help.
Currently I used UE4.27 on my project and I’m facing an annoying problem that is “Lighting build failed. Swarm failed to kick off. Compile Unreal Lightmass”.
From all the tutorials I saw on YouTube, they used Visual Studio 2022 to fix the problem.
Unfortunately, I did not manage to use it. I’m trying so many time.
My Project file stored in File D. My question is, VS2022 only able to read files stored in C files? What if my project stored in D files, do i need to move it to C file for me to use VS2022.
I have previously built 4.27 on VS2019 and VS2022.
“Lighting build failed. Swarm failed to kick off. Compile Unreal Lightmass”.
Can be fixed by the following procedure. Your project can be on any drive, but the full path must be less than 25 characters. Your project file name must be less than 20 characters.
You will need to build a 4.27 source UnrealLightMass project in VS as in the picture below
using the 4.27 unreal Source
Next you need to open a new project like the Third Person Shooter.
in Top bar menu “Build Lighting Only” the Swarm Manager starts up
This will start the Swarm Control. Select Settings
Next you need to open a new project the Third Person Shooter again
in Top bar menu “Build Lighting Only” the Swarm Manager starts up.
This time the screen will display “Building Lighting…”
Finally a box will say “Lighting build completed”
unfortunately I lose UnrealLightmass.
I have no idea what had happened .
What should I do?
If you cannot find the 4.27 source then follow the post which explains how to register for the source.
Then clone the 4.27 source code
$ mkdir source\repos
$ cd source\repos
$ git clone https://github.com/EpicGames/UnrealEngine.git -b 4.27
$ cd 4.27
$ GenerateProjectFiles.bat -2022 or 2019 if you want
open Ue4.sln using Visual Studio
Right-click UE4 project and “Build”
Then carry out the instructions above for UnrealLightMass project
The only way I found to get rid of this problem, looking inside UBT code, is to edit the BuildConfiguration.xml file (Engine/Saved/UnrealBuildTool/BuildConfiguration.xml) with this:
<?xml version="1.0" encoding="utf-8" ?> <Configuration xmlns="https://www.unrealengine.com/BuildConfiguration"> <ParallelExecutor> <MemoryPerActionBytes>0</MemoryPerActionBytes> </ParallelExecutor> </Configuration>
I have a low spec PC, and it gave to me 1 action in parallel message (because I have 8 GB of RAM with an i7-3770 CPU) before, which was very frustrating, but now it’s back again to 4.
Hope this helps everyone in the same situation (even someone with good CPU and low physical RAM)