Hacking around I managed to both a) identify the problem plugins, and b) make the build tool immune to this crash.
- Open C:\Program Files\Epic Games\UE_5.4\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.sln in Visual Studio
- Make Configuration/ModuleRules.cs writable
- Find the IsValidForTarget method
- Replace the first line of code with the code below.
- Compile with Build → Build Solution (make sure it completes ok and says it’s updated the C:\Program Files\Epic Games\UE_5.4\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll file.
- Attempt to build your project/plugin again
- Look in the “C:\Users_yourusername_\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.4” or similar folder for the .txt file with the long name.
- In it search for “Does not support” and see if the new code has triggered. The start of the line will tell you the plugin.
IEnumerable<TargetType> supportedTargetTypes = new TargetType[] { };
try
{
supportedTargetTypes = moduleType
.GetCustomAttributes<SupportedTargetTypesAttribute>().SelectMany(x => x.TargetTypes).Distinct();
}
catch
{
string module_name = (moduleType != null) ? moduleType.Name : "<null>";
invalidReason = $"TargetType '{targetRules.Type}' : Failed to get SupportedTargetTypesAttribute from '{module_name}'";
return false;
}