Unreal Engine not using Visual Studio 2019 to generate project files

So i have the Hotfix Version of UE4.23 (4.23.1) And i am unable to generate project files using the unrealbuild tool using VS2019. i know that VS2019 is supported, so why is this happening?. i deleted VS2017 a little while back and i definitely am not gonna be downloading it back so please dont give that suggestion. I tried adding this:

[/Script/WindowsTargetPlatform.WindowsTargetSettings]

Compiler=VisualStudio2019

to the defaultengine.ini and it didnt work. also tried using this cmdline → -2019 but UEBuildTool Still doesnt care about it. just keeps saying it needs VS2017.

Have you tried changing it in your Unreal Editor Preferences?

And I also believe there is a setting in the BuildConfiguration.xml. See the docs at VCProjectFileGenerator > Version. I think that you set the target platform for Windows, not your source code editor for UBT

1 Like

1-) yes i had tried changing it in the unreal editor preferences. but after i added a class( C++) i cant use the editor anymore anyway since it hasnt compiled. i might be able to solve that by deleting the source files.
2-) i will take a look at the buildconfig

update: Apparently Unreal Doesnt care what i put there. It is indeed checking in there since it gave me syntax errors but i put the values correctly but it isnt using those.

update 2: had to use the Window’s Platform’s Compiler Roots as well. and then it worked

here is how to fix it:

override the BuildConfiguration.xml in %appdata%\Unreal Engine\UnrealBuildTool\ with this:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
    <WindowsPlatform>
        <CompilerVersion>14.22.27905</CompilerVersion>
        <Compiler>VisualStudio2019</Compiler>
    </WindowsPlatform>
    <VCProjectFileGenerator>
        <Version>VisualStudio2019</Version>
    </VCProjectFileGenerator>
</Configuration>
2 Likes