GenerateProjectFiles ERROR: UnrealBuildTool was unable to generate project files

There is a very strange issue.
I have compile engine source code before,but this time when I compile 4.26branch,UBT can’t find any version of visual studio.I have tried vs2017 15.9.26,vs2019 16.5.5/16.7.4 with different MSVC as 14.22,14.25.But UBT only post one error:ERROR: Visual Studio 2017/19 ( version number ) must be installed in order to build this target.
But when I use other version to compile project sln,it works well.
I wonder why this issue happened or UBT how to find the visual studio.