VS 2019 - 16.3.1 version

Anyone upgrade to this version? After changing the include in the NVIDIA engine file, did you get problems with the math check?

Compiling UE4 4.22 engine gives error not finding typeinfo.h from NVIDIA’s PSAllocator.h code.

And would be nice to have way to go back to 16.2

VS 16.3 completely breaks compiling the engine, and it is not possible to downgrade the community version. However, not all is lost:

In the VS installer, go to individual components, scroll down to compilers, and check this:

Then, open or create %AppData%\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml and replace the content with:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">

This should let you keep building the engine by using the version of the compiler that ships with VS 16.2.

Hopefully epic/ms will fix this in the future…

I have the Professional version. Is there a way to downgrade it? I am currently in a snafu with relicensing my copy (literally on the phone on hold atm).

Thank you!

Having to add C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\Include\um to my include directory as my machine never had vs2017 so the Window8.1 SDK was never installed and is not an option under the VS2019 section of the installer.

A quick fix, without installing anything extra:

Change the offending line in PsAllocator.h to
#include <typeinfo> // without “.h”

This got me going again after installing VS2019 Community 16.3.2. Running UE4 Editor 4.23.0 (built from latest release branch) now without problems.

This allows compiling the engine, but it does not fix the completely broken math in 4.22. I don’t know about 4.23.

Thanks for posting it worked great - (without it there is no way to downgrade VS2019 and cant even find VS 2017 Community for download anymore…)

I followed Zeblote’s instructions. I am on 16.3.2 technically but UE4 is not using it.

Epic has logged the issue, which probably means fix soon: Unreal Engine Issues and Bug Tracker (UE-81677)

You can create new file typeinfo.h at “…\2019\Community\VC\Tools\MSVC\14.23.28105\include” location with following text:

#include <typeinfo>

When I got past this issue, there were other problems with FMath failing a bunch of self checks. Going to stick with earlier compiler as I don’t have a specific reason to upgrade.

Yup. Even if everything compiles fine, new binaries will break the project.
In my case, it kills camera orientation while playing.

Update to VS 2019 - 16.3.5 is available, has anyone tried it? Does it solve the problem?

It is not. MS deprecated typeinfo.h
The is a fix commit for future UE4 versions: https://github.com/EpicGames/UnrealEngine/pull/6226

I installed the 14.22 build tools and replaced the BuildConfiguration.xml with yours, but I’m getting:

PS C:\git\UnrealEngine> .\GenerateProjectFiles.bat -2019
Setting up Unreal Engine 4 project files...
Binding IntelliSense data... 100%
Writing project files... 93%
ERROR: Visual Studio 2017 (14.22.27905) must be installed in order to build this target.

GenerateProjectFiles ERROR: UnrealBuildTool was unable to generate project files.

Press any key to continue . . .

When I try to generate project files. Any idea why it is looking for 2017 (14.22.27905) instead of 2019 (14.22.27905) (gave it the -2019 flag and the build configuration xml says 2019 for compiler and VCProjectFileGenerator)?

UBT is broken in 4.23 and attempts to overwrite the windows configuration with a hololens configuration. God knows why. I am not entirely sure why specifying -2019 does not work, it might be because it is also missing [ConfigSubObject] markup. Just go into UEBuildHoloLens.cs and change the line 26 to

public WindowsCompiler Compiler = WindowsCompiler.VisualStudio2019;

Glad I have held off on 4.23. I normally update soon as a new release is out.

Just double check that it actually installed. I had the same issue however when i went back to the components listing 14.22 was unchecked again. Installing a second time worked.

This Discussion is very useful. Could someone write a reliable and definitive tutorial?