Hi @Lathesh_shetty I had a similar problem recently.
In my case it was because there had been a change in the source code which prevented later version of Visual Studio from working
in the root of your source code you will see the file
MicrosoftPlatformSDK.Versions.cs (6.7 KB)
In here you will see that the version number range has been expanded
you may have to change the first value to 14.31.31103 by hand with `
notepad Engine\Source\Programs\UnrealBuildTool\Platform\Windows\MicrosoftPlatformSDK.Versions.cs
on the command line root of UE5 source
I also found a problem with preview version of VS2022 and patched as in picture
Basically I removed the “!” to stop code from ignoring Latest Preview versions of VS 2022 in the file “MicrosoftPlatformSDK.cs”
My best way of solving this is the get the final Production version of VS2022 downloaded and install ALL the previous library use Individual Components section and the patches above as the
GenerateProjectFile.bat -2022 uses this patch
see my Readme at
UnrealEngine-5/README.md at Luoshuangs-GPULightmass-5.1.1-vs2022 · jimshalo10/UnrealEngine-5 (github.com)