Visual Studio 2022 is 64 bit and compiles and runs UE 5.0 EA approximately 20% FASTER

My build fails with the following error:
CMakeCCompilerId.c.obj : error LNK2005: main already defined in Module.ResonanceAudio.cpp.obj
Can someone advice please?

Hi @PaGo, This is some sort of problem with the linker. I got around this by Executing a Right Click on UE5.sln Project and select “Set as Startup Project”.
Right, Click and Select “Clean” this will delete the corrupted projects.
Right Click on UE5.sln Project and select “Build”.
This should now build UE5. Got to Menu View → Select “Output” and watch the compiler building

Doesn’t work… can’t create c++ projects with VS 2022

Hi @Marius_Sheppard
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.
This section is historic code so it’s hard to read.

In UE4 .24/27 if you don’t have 2017 installed you get the same problem, hence why the was carried over from UE4 I assume.

1 Like

For anyone watching this thread who are unaware:

Visual Studio 2022 Preview 2 has been released, which includes updated C++ build tools (notably including the updated compiler).


Hi @Marius_Sheppard, There is progress with getting UE50EA2 to create C++ projects.
I now have VS2019, building C++ projects correctly. Previously there was a problem carried over from UE4 that needed VS2017 installed. I will now work on getting VS2022 compiling projects.

If you want to manually build with VS2022 go to your project.sln right-click open with VS2022. right-click your project.sln select “Build”, when built press Ctrl-F5, “Start without Debugging”

To all those following this thread please load the latest update Preview and look at the Notification bell symbol with a number that will appear. Click on the bell symbol and the Notifications windows will appear. Select and Click on the Visual Studio 2022 Preview and select “Start Update on Visual Studio on Closing”.

The debug symbols load is now so fast. The new compiler has taken 480 seconds of compile build time of UE50EA as its all 64 bit

For the Graphics Content designer, have a look at the new icons and send feedback when you create a new project in the VS2022 preview.
It’s awesome with Preview 2 my conversion of the Epic Marketplace Infiltrator example from UE4 to UE5 its 10GB project have to be held inside UE5. The total memory used was beyond 12GB whilst running the shader compilers, all eleven, as each shader compiler run completed another item appeared in the window.
Goodbye 32bit 4GB memory limit!.

Please load the UE5EA and build it from the source with VS2022 as described above.
We UE5EA group are building one of the biggest test projects for VS2022 Preview.

This is influencing the performance of the final version of VS2022, the MS Compiler Engineering teams are looking at the performance statistics for compiling UE50 and execution of the UE50EA code and the more people test this the better for the future of UE50

@Jimbohalo10 thank you very much for posting this guide and hosting the repository that works with VS2022 preview 2.

Last night after not touching the engine (or game dev) in a while, I installed VS2022 and build UE5EA from your repository and it seems to work (just getting home, need to mess around with it to be sure). One thing I noticed when building the UE5 solution is that seldom did my memory usage ever go above 2GB. The entire process took about 4 hours, is that normal? (PC is Ryzen 5 3600X 6-Core, 16GB Ram)

 ---------------------- Done ----------------------
      Rebuild All: 1 succeeded, 0 failed, 0 skipped
  1 build system warning(s):
     - License is invalid
  Total time in XGE executor: 14441.61 seconds
  Total execution time: 14621.10 seconds

Hi @Star_Dust ,
Yes , this is normal on this specification of machine, to decrease the speed compilation you need and Sold State disk and 32GB memory and possibly a 64GB pagefile.

That aside I am glad the build works ok for you, as your System is well below the minimum spec for UE50AE.
My system is below the recommended system specification as well, but with patience I managed to develop this



I have been told by VS Preview Engineering that
Visual Studio 2022 Preview 3.1 has been RELEASED
Please go into Visual Studio 2022 Preview 2 and look at the bell symbol with a number that will appear. Click on the Visual Studio 2022 Preview 3 and select “Start Update on Visual Studio on Closing”.
When installed reopen UE5.sln with Visual Studio 2022 Preview 3.1

On UE5 .sln click “Clean”, Then “Build”, currently my PC take about 4300 seconds(78 minutes).
Please do the update and re-build, then build your project.

VS2022 Preview 3 automatically builds C++ BP project now
see 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

1 Like

I guess I’ll throw in my feedback and say that I was able to successfully upgrade the ue5 main Visual Studio project to compile native Visual Studio 2022 instead of being “ue5 (visual studio 2019)”
I didn’t even really need to do anything just right click on it and retarget it. I don’t really know if it’s any faster. Because I’m a little bit more distracted right now with trying to diagnose a an issue on the latest commit which was “dfae4dfb7ec0164b710efdf84185bcaa38e2fc01” so I went back a couple commits to this one to get it to successfully work “d670e221547c7f784597fecbed70d85abd943d15”. It was throwing up a weird couldn’t compile the world grid material thing when I tried to load my project shrugs. I know I just have to wait a couple more commits and I’m pretty sure it’ll just be fixed anyway so I’m not going to really be too upset about it.

1 Like

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.

Hi @Marius_Sheppard @Knauric
I said of my VS 2022 fork problem with creating BP C++

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 -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]

Hi, @Marius_Sheppard @Knauric and Everyone reading. This thread. Firstly thank you for using Visual Studio 2022 Preview 3.

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. :nauseated_face::thinking:

The SSD/NVRAM version take 4767 seconds :grin::sunglasses::heavy_check_mark: 78 minutes

Preview RC2 now builds 200 seconds faster!
Total time in Parallel executor: 4353.28 seconds​:grin::heavy_check_mark:

Visual Studio 2022 won’t be allowed installed on an IDE when an SSD exists.


Hi Jimbohalo10,

could you please give me an advice.

I have

  • 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

1 Like

Hi @Bettina4you,
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.