Use the <PROJECT_DIRECTORY>/Saved/UnrealBuildTool/BuildConfiguration.xml directory for project-specific build configuration where <PROJECT_DIRECTORY> is the path to your project’s directory.
Edit the XML file to something that looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<WindowsPlatform>
<CompilerVersion>14.38.33130</CompilerVersion>
<WindowsSdkVersion>10.0.18362.0</WindowsSdkVersion>
<!-- Replace version numbers with the ones you want -->
</WindowsPlatform>
</Configuration>
Thank you very much @rohitsutreja this was exactly what I needed!
I package a plugin for multiple versions of UE (from 4.27 to 5.5) and setting the toolchain version in the BuildConfiguration.xml was causing issues:
The ones located in the AppData and in the user’s Documents are shared by all engine versions.
I tried to add one in the Engine/Saved/UnrealBuildTool but it doesn’t seem to work (maybe this one is used only when building the engine from source?)
I package the plugin from command line, which creates a temporary project to compile it. So it was not an option to set it per-project.
However, using the .ini files allow me set a custom toolchain version per engine (not per project).
To do that I’ve just modified the file <ENGINE_DIR>/Engine/Config/BaseEngine.ini with the compiler version and the toolchain version.
For example, for UE 5.3 I’ve modified C:/Program Files/Epic Games/UE_5.3/Engine/Config/BaseEngine.ini by adding those 2 lines in the WindowsTargetSettings group (by searching Windows in the file):