Generate cpp project Couldn't find UnrealBuildTool

Use something like

“D:<your install folder>\Epic Games\UE_5.0EA\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe” -projectfiles -project=“D:\DNATG\UE5\ValleyoftheAncient\ValleyoftheAncient.uproject” -game -Engine -rocket -progress

should work