[UBT Bug] No longer able to compile plugins in standalone since 5.3

Hacking around I managed to both a) identify the problem plugins, and b) make the build tool immune to this crash.

  1. Open C:\Program Files\Epic Games\UE_5.4\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.sln in Visual Studio
  2. Make Configuration/ModuleRules.cs writable
  3. Find the IsValidForTarget method
  4. Replace the first line of code with the code below.
  5. 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.
  6. Attempt to build your project/plugin again
  7. 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.
  8. 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;
			}
4 Likes