UE5 Visual Studio 2019 must be installed in order to build this target

In this tutorial we discuss how to fix the visual studio XXXX must be installed error, why it occurs, and in which situations you are most likely to get the error.


You may have just upgraded or downgraded either your Visual Studio version or your unreal engine version and got met with this error. The following steps will help you debug and troubleshoot what’s causing Unreal Engine not to find your installed Visual studio version 2017,2019,2022 or any future Visual Studio versions.

Full Solution Steps

Unreal Build Configuration

You need to open the unrealbuildconfiguration.xml to set the new version of Visual Studio. The file  can be located at one of the following locations

  • Engine/Saved/UnrealBuildTool/BuildConfiguration.xml
  • User Folder/AppData/Roaming/Unreal Engine / UnrealBuildTool/ BuildConfiguration.xml
  • My Documents/Unreal Engine/UnrealBuildTool/BuildConfiguration.xml
UE5 Add Widgets To Sequencer

Add UMG widgets to Level Sequences Easily


VCProjectFileGenerator Setting

UE5 Set visual studio for building

Inside the XML file, you have to look for and change the value of the VCProjectFileGenerator to your required Visual Studio version. This is denoted by using the Year of the VC version. Here is what it should look like for VS 2022 :



WindowsPlatform XML Setting

Still, inside the unreal buildconfiguration.xml file, you have to find and change the value of the WindowsPlatform to your required Visual Studio version. This is what it should look like for VS 2022 :




If following the above steps doesn’t work, removing other buildconfiguration.xml files from the above path and only leaving 1 might help. That’s because unreal engine uses only one of these and it makes sense for just 1 to be available. You can delete the others and see if it helps.

You can read more about the unreal buildconfiguration.xml file here:

REFERENCE : https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/BuildTools/UnrealBuildTool/BuildConfiguration/

Consider investing in some of our plugins. They might save you some time.  Also helps supports these tutorials.

Instantly get access to our plugins like Blender Curves Importer and UMG Cinematics and more when  you support us on Patreon!

 Join Us On Discord For More Daily Tips!