I want to build UE 4.26.1 myself, but after cloning the repository and running Setup.bat successfully I get stuck with GenerateProjectFiles.bat outputing the following error, on which I am unable to find any information about on the internet:
Setting up Unreal Engine 4 project files...
Binding IntelliSense data... 100%
Writing project files... 94%
ERROR: Unable to find platform.winmd for Visual Studio 2019 toolchain; 'Latest' is an invalid version
GenerateProjectFiles ERROR: UnrealBuildTool was unable to generate project files.
Here is some information which might be helpful:
OS: Windows 10 21H2
Installed Visual Studio Versions:
Visual Studio Community 2019
Visual Studio Community 2022
Installed Windows SDKs:
Windows Software Development Kit - Windows 10.0.19041.685 ← SDK installed with VS 2019, rest is VS 2022
Windows Software Development Kit - Windows 10.0.22000.194
Windows Software Development Kit - Windows 10.0.22000.832
Just to cover all bases, you are saying you have the Universal Windows Platform Development module installed in Visual Studios? See the following document for more information:
One day later and I found a fix to this obscure issue.
Turns out that the Unreal Build Tool which comes with UE 4.26.1 always uses Visual Studio 2022 install folder, even though 2019 is specified, which should be used automatically even without manually specifying so.
There seem to be two possible fixes:
Temporarally move your Visual Studio 2022 install to another location
Install the ‘Game developement with C++’ workload for Visual Studio 2022 as well
The reason why this issue has not come up for anyone before is that most people, including the ones I asked for help with this problem privately, have the ‘Game developement with C++’ workload installed with Visual Studio 2022 as well. So even though it also uses the wrong VS install, it still ends up finding the platform.winmd.