I’m getting this annoying message in output window in Visual Studio every time I compile project, here is the snapshot of relevant part of the message:
[Upgrade] Using backward-compatible
build settings. The latest version of
UE4 sets the following values by
default, which may require code
changes: [Upgrade]
bLegacyPublicIncludePaths = false
=> Omits subfolders from public include paths to reduce compiler
command line length. (Previously:
true). [Upgrade]
ShadowVariableWarningLevel =
WarningLevel.Error => Treats
shadowed variable warnings as errors.
(Previously: WarningLevel.Warning).
[Upgrade] PCHUsage =
PCHUsageMode.UseExplicitOrSharedPCHs
=> Set in build.cs files to enables IWYU-style PCH model. See Include What You Use (IWYU) for Unreal Engine Programming | Unreal Engine 5.3 Documentation.
(Previously:
PCHUsageMode.UseSharedPCHs). [Upgrade]
Suppress this message by setting
‘DefaultBuildSettings =
BuildSettingsVersion.V2;’ in
SlateTestEditor.Target.cs, and
explicitly overriding settings that
differ from the new defaults.
obviously I can just add
DefaultBuildSettings =
BuildSettingsVersion.V2.
into build.cs file but but,
shouldn’t this new settings be default somehow, instead of specifiying defaults manually?
in the ProjectName.Target.cs file, you will get warnings when packaging. You need to go to the Project.Build.cs file and add an entry for each module you will use - e.g.
You’ll need to go to each header/cpp file that produces a warning and find its location. You then need to add the entire location to the #include = e.g.
You will also have to fix any shadowing of local variables (meaning you declared a variable locally in a code block with the same name and type as a variable that is already in the class). Once these are fixed, everything will work normally. The linked article more or less uses an automated script to accomplish this.