Visual Studio 2022 builds and runs UE5.0

Hi, @Knauric and Everyone reading. Firstly thank you for using Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.1.6
is now out at EpicGames/UnrealEngine at 5.0 (github.com)

Final Shipment is released on 8th November 2021 Visual Studio 2022 version 17.2 p5

Visual Studio 2022 Preview has been updated and is according to the road map will be updated each month until final release on 8th November 2021. After this time there will be feature updates through 2022 like GitHub functionality rewritten.

This post is an update on the original repository and 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

My recent work has been to concentrate on making the new

repository building and testing all the functions and ONLY needs Visual Studio 2022

$ mkdir ue50
$ "git clone https://github.com/jimshalo10/UnrealEngine-5.git -b 5.0
$ cd ue50
$ setup.bat

C:> mkdir C:\Users\Owner\source\repos\ue50\Engine\Restricted\NotForLicensees
where ue50 is the root of my branch
then GenerateProjectFiles.bat -2022
again and my generate works.
$ GenerateProjectFiles.bat -2022

Unreal Editor Projects are not compatible with the previous versions of projects. Keep backups of your original backups and DO NOT use “Convert in Place”.
Before you delete any asset of a project make a backup as this is still a “work in progress”.

Please refer to the original posting for detailed support.
In this version, Windows Packaging on VS2022 Preview now works

The size of UE5.0 make it important that you defragment to a hard disk overnight. SSD/NVRAM do NOT need this
use the 64bit Native Administrator command shell of VS2022
defrag D: /H /M 16
I am defragmenting D: (1.8TB) at Normal priority using MultiThread = 16
I now use this every day/week. There is a massive boost to VS2022 when building off an SSD/NVRAM.
You CAN only VS2022 on SSD/NVRAM and you may need a 64GB pagefile.sys as well.

3 Likes

Hi, after running the Setup, I got the following error message showed that one dependency file’s name path is too long:

Checking dependencies…
Updating dependencies: 99% (70332/71270), 13321.8/13322.4 MiB | 0.01 MiB/s…
Failed to download ‘http://cdn.unrealengine.com/dependencies/UnrealEngine-4358751-16521f530c414728b289dbb71f593410/80c1ba699c3de9b0950a5521e587025e7f85f8bb’: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. (PathTooLongException)
Press any key to continue . . .

Any clue for this?

Hi @Stevenmbiz
The path you used is too long. You need to change from
c:\owner\source\repos\Unreal-5-EarlyAccess\ to
c:\owner\source\UE5EA\

Basically, this error says your path length exceeds the maximum length

Thanks, I’m trying that.

Hi,

I just installed and started using VS2022 with my UE5 project and it seems that they are still incompatible.

Each UE code marked as red (error) has the text “definition not found”.

I tested it with a new UE4 project and it worked fine, no error, intelli is displayed.

Tell me what could be wrong? Maybe I need to fix some configuration in my UE5 project.

Thanks!

Hi @APARTASIUK

UPDATE Great news the pre-release version is out EpicGames/UnrealEngine at 5.0 (github.com)

Unfortunately, Epic has decided to call [ue5-main version] to be version UE 5.1.
Basically, this has messed up many peoples projects as they cannot be read and converted.

There has been much discussion but Epic say that prior projects are not compatible, like UE 4.27 is not compatible with UE5 EA or UE5 main.

UE 5.1 in GitHub ue5-main and backwards compatibility with 5.0

The nearest potential working is believed to be UE4.26 works on UE5 EA and will convert to UE 5.0

It’s a shame but that’s the way it is

1 Like

Thanks for explanation!

Hi All,
UPDATE
My version is jimshalo10/UnrealEngine-5: Update the Quixel Plugin is version 2012.0.04. https://github.com/jimshalo10/UnrealEngine-5/tree/5.0-vs2022
Some people are having problems with 2012.0.05 so I have not updated to the latest version
My version of ue5-main is now obsolete and removed

Thanks

Does 4.27 (Projects) work with VS 2022?

Hi @shukenmg,
If you mean can you build using just VS2022 and 4.27? You can,

However large projects (31GB) like
“SlayAnimationSample 4.27/SlayAnimationSample.uproject” require more memory use
a crash randomly due to background process threads failing.

Sample 4.27 Project like Open Trees converts fine.

I believe VS2022 Release Candidate 2 works fine. It contains the latest C++ compiler version 17 so this gives a warning about code that was not seen in other prior versions. I have 4.27 source built and running using VS2022 as it’s my default VS build version.

Many developers have used VS2022 RC2 and I persuaded VS Engineering to use UE5 and prior versions in final testing.

Most importantly VS2019 is 32bit and ignores 32bit overflow errors.

V2022 is 64 bit, and hence its speed, and detects 32bit overflow errors.

Bizare is the fact 4.27 projects, get newly detected packaging errors, the developers do not read the output log to see their project contains newly detected coding errors in Blueprints c++ and say the conversion process fails.

The main problem I can across is you cannot have VS2019 and VS2022 available at the same time, for some reason UE 4.27 goes for VS2019 first and will fail.

This has been fixed in UE5.0 and always goes for VS2022 first

Perfect, thank you, i plan to upgrade to VS 2022 after Nov 8th (When VS 2022 is fully released)
Glad to know that it’s possible to use it.

Thanks for the info!

What c++ standard does unreal support for vs22?
Cureently unreal as far as i know does not support

CppStandard = CppStandardVersion.Latest;

but

CppStandard = CppStandardVersion.Cpp17;
works

FYI

hi @Terrian @shukenmg, Oh Excellent. The work is NO longer NDA.

I got MS Engineering involved with a problem with UE5. I proved where the error occurred and MS VS Engineer could replicate the problem, I asked that MS VS Engineering to work with Unreal as it would be such a boost to VS2022 and Unreal 5 to be one of the major tests.

2 Likes

Hey @jimbohalo10, any chance you can explain why your Git branch is necessary? I’d rather make the same changes to my own branch. From how it appears on https://github.com/jimshalo10/UnrealEngine-5/commits?author=jimshalo10, you only have the single commit that basically just deletes the NeuralNetworkInterface module and a cmake file for an audio module. Are there no changes to UBT that are needed to get VS 2022 to work? Thanks!

Edit: Looks like the official 5.0 branch has the UBT changes necessary for 2022, so I’m guessing I’m fine to just use 5.0 and not use this branch. I’ll give it a shot and report back.

Hi @IncantaGames,
I have redone the repo, that’s why you cannot see the Quixel Bridge updated 2021.0.4 plugin.
Some Quixel users need this to fix problems.

Anyway I now use ue5-release-engine-test · jimshalo10/UnrealEngine-5 (github.com). Which is basically a good version without Quixel Updates.

In this, I have successfully built the 4.27 sample to “ICVFXProductionTest2 in 5.1” as a VS2022 RC3 Project solution, and it runs on my humble GTX 1050.

Built as a C++ class project in 4.27 and converted to UE5 and VS2022 RC3.
The errors were fixed by the new RC3 Intellisense and Hot Reload help fix a minor error

I guess I was hoping for more of a detailed synopsis of the necessary changes made for the branch to work with VS 2022, but I can look through your git history on that branch and figure it out myself. Unfortunately that branch isn’t usable for myself (and many other users) since it’s 5.1 and not 5.0. Nevertheless, thanks!

Works just fine with 2022 final release (and also RC 3) and 5.0 for me. Everything compiles and runs properly. So I guess the custom GIT branch build based on 5.1 is not necessary anymore.

2 Likes

Hi @IncantaGames,
In my original post for UE50EA,
someone had asked for the patches for VS2022 UE5EA
This is not the default branch anymore
so

“git clone https://github.com/jimshalo10/UnrealEngine-5.git -b ue5EA-vs2022"

In fact, each of these is prefaced by the search pattern “@V2022
and can be found with the command with the Git Bash command

git grep -r -n --after=1 -i “@Vs2022” – . > Vs2022patches2.txt

You might need two minuses to indicate the dot is a file path.

The sample output is as follows

Engine/Plugins/Developer/VisualStudioCodeSourceCodeAccess/Source/VisualStudioCodeSourceCodeAccess/VisualStudioCodeSourceCodeAccess.Build.cs:32: case WindowsCompiler.VisualStudio2022: //@VS2022 support added

This was developing software and contains numerous statements about compilers.
I cannot see the reason for this as it’s now embedded in the recent repositories from Epic. I have left this because it shows the development and learning path for others.

If you need VS2022 to build prior versions like 4.26 then just keep only VS2022, don’t enable VS2019 or other versions, and the prior version will build.

So, if i understand correctly, both ue5-main and 5.0 branches now support vs2022? I am just compiling ue5 main in vs2022 and it is going fine.