Packaging error 'detected compiler newer than visual studio 2022' - beginner

Hello, it’s my first time packaging in unreal and i’ve ran into the error highlighted in yellow below when attempting to package for windows:

I am still using unreal engine 5.1, I only used blueprints, I have installed visual studio 2022 with the correct modifications (.net framework, c++ for games, c++ for desktop development. Can someone please tell me how to fix it?

Thank you

You will need to install the correct MSVC version for ue5.1
Usually it MSVC 14.34 from your visual studio installer. (as mentioned here

And make sure you have the correct windows sdk for your exact windows 11 build version(that you can check with start>search winver)

You might also want to uninstall any old visual studio left over.

Any third party plugin that are not from epic will require a package with visual studio even if you dont have any cpp files.

1 Like

Hello, thank you for your reply. I have downloaded the component you said:

I also downloaded an SDK before from here: https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/

this was the tutorial about the SDK download I used: https://www.youtube.com/watch?v=JHta1LaaUws

This is my version of windows in case that’s an issue:

I don’t have any older versions of visual studio, I do have Visual Studio Code which is another standalone software.

So after doing these steps the outcome remains the same:

This is the full output log, I didn’t quite understand the ‘upgrade’ parts which I also highlighted in yellow.

You need to install x86/64 and not an Arm build version for the MSVC.

Usually installing the windows sdk standalone might cause issues, i recommend using the one provided in visual studio installer that match your exact windows build version 19045.

*you can ignore the upgrade parts, what important is the msvc version as it using 14.42 from the log. If you switch to 5.4 thought, it will package fine since it can support a newer version of msvc.

Hi, thanks for your reply

I chose this MSVC version so it’s matched to the one mentioned in the log (14.42)

Capture2

could you let me know how I can figure out which SDK version I need from visual studio for my windows build?

I came across these which don’t quite match to 19045, but 19041 is pretty close.

You need to install MSVC 14.34

The one that is mentioned in the log is the current version it trying to use. 14.42 didnt exist when ue5.1 was made that why it giving that warning msg.

Yes windows 10 SDK 19041 should work fine.

1 Like

Hello, I would like to thank you for your patience.

I believe I have the correct SDK and MSCV downloaded now:

Capture

Capture2

Although it seems that Unreal is still using a different version from the ones I’ve just downloaded, possibly I may need to change something in the settings to update it? or something else?

Thank you for your patience with this

Go to the folder: %AppData%\Unreal Engine\UnrealBuildTool (copy paste and enter)

Delete the file BuildConfiguration.xml, this should reset the visual studio toolchain version.

Otherwise:

  • delete the msvc 14.42
  • or manually write the config like on this page

Could you let me know what I am pasting into the folder? i’ve deleted the BuildConfiguration.xml file that was inside the folder. I have also uninstalled 14.42.

Could you let me know where to write this?

Thank you for helping me understand

Hello, thank you for your reply, sorry if it’s a very beginner / obvious question, I didn’t quite understand step 2, could you explain it? is that code we are supposed to paste somewhere, I understand the xml file, in another reply someone else said to delete it in order for unreal engine to update the msvc or sdk (something like that) but that was the only part I understood. Could you give me clearer instructions, thank you

When only one version of the compiler is installed, if this compiler is deleted and another version is installed, but the file settings remain unchanged and are still set to use the previous version of the compiler, the compiler will not be found during compilation.
If multiple versions of the compiler are installed simultaneously, you can change which version of the compiler is currently being used by modifying this file.
When there are multiple versions of engines on the computer, it is necessary to switch between different compilers to use them. For example, my computer is also installed with 4.27, 5.2, and 5.4

Hello, thank you for explaining, when attempting to package it seems to be giving some kind of errors with the code that you sent:


I’m not sure if i typed the compiler version correctly? this is the version and sdk:
Capture3
Capture4

Do not use “out of Support” version
Use the version directly labeled with the version number

Your toolchain version is: 14.34.31933 and not 14.34.19041

1 Like

Hello, thank you, can you let me know what 31933 is? where does this value come from?

Hello readers, this is a summary of this thread and how to set-up the compiler for unreal engine and avoid errors, solved by: @Arodi007 and @villinx

You will need visual studio installer and visual studio 2022 downloaded in order for unreal engine to be able to compile and package your game build.

  1. You must download the SDK (software developement tool) and MSVC (microsoft visual compiler) from visual studio installer.

Press ‘modify’

there are tabs at the top, press ‘individual components’ this is the list of all the SDK and msvc available to download.

2. choosing the SDK - you must choose it based on your version of windows, you can check your windows version by start > and type ‘search winver’ into the search bar. If you don’t know which version to get, you can ask in the forum or search it on google.

3. choosing the msvc - you can check online which version of mscv is compatible with your version of unreal engine. typically, if you’re using a newer compiler but an older version of unreal engine, they won’t be compatible, If you don’t know which version to download, you can leave a question in the forum or search on google.

Make sure to download ‘x64/x84 build tools’ of your msvc and not ‘arms build’ version.

4. delete any old msvc if you aren’t using them. You can do this within the visual studio installer by unchecking them and pressing modify, which will uninstall them for you.

5. Telling unreal to use the new msvc / sdk you downloaded.

To do this, in the windows search bar, search for the folder %appdata%, navigate unreal > buildtools > buildconfiguration

Open this ‘build configuration’ file in any text editor, you must update this code like this:

You may need to type it out like this, the parts highlighted in yellow must be adjusted to whatever msvc you have downloaded

6. save the file and restart unreal engine. This should mean the compiler is correctly set up ready to package your game build.

1 Like

You can find all the msvc version from this directory: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC

Additional Note for those looking: to match your exact msvc(toolchain ver) for your unreal engine 5.x, go to their version compatibility page and note down it VS 2022 Version.


1 Like

Go to this folder to view the version
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC

and dont use the out of support version.

i use 14.36.32532 for 5.2

1 Like


iv download this four versions and set 14.36.32532 for packaging
both 5.2 and 5.4 all can be packaged normally :+1:

1 Like