Generate visual studio files error: 'UnrealBuildTool.TargetRules' does not contain a constructor that takes 0 arguments

This happened to me when opening a 4.19 project with the 4.20 version of the engine. Calling the base class’ constructor indeed worked. I did this in both Target.cs files