Please help: ERROR: Expecting to find a type to be declared in a target rules named ‘UE4EditorTarget’. This type must derive from the ‘TargetRules’ type defined by Unreal Build Tool.

when i generate visual studio project files - ERROR: Expecting to find a type to be declared in a target rules named ‘UE4EditorTarget’. This type must derive from the ‘TargetRules’ type defined by Unreal Build Tool.

Running C:/Program Files/Epic Games/UE_4.27/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“C:/Users/hp/Documents/Unreal Projects/ERE/ERE.uproject” -game -rocket -progress -log=“C:\Users\hp\Documents\Unreal Projects\REM/Saved/Logs/UnrealVersionSelector-2023.11.25-13.02.37.log”
Discovering modules, targets and source code for project…

ERROR: Expecting to find a type to be declared in a target rules named ‘UE4EditorTarget’. This type must derive from the ‘TargetRules’ type defined by Unreal Build Tool.

Please help…

I solved this issue. suppose you downloaded the binary version go to the epic installer and click verify, on the UE version, wait for it to download and verify, then create a new C++ project. Then delete your project’s intermediate, vs, binary folder. Right-click on your UE project file and generate a new code.