I started to see this error when migrating from 5.3 to 5.4.2, and i added these lines on ProjectName.Target.cs AND ProjectNameEditor.Target.cs and solved the issue, thanks a lot!.
DefaultBuildSettings = BuildSettingsVersion.V5;
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_4;