Toolchain Error Generating Project Files for VS 2022 (UE 5.1)

I found what was causing it and found a work around, but it feels like a bug and I’m not sure what the side effects of the work around might be.

The issue is that I don’t have any non-preview toolchains. I tried to install one that was non-preview, but they all said preview after I installed them.
What was happening is this one line in the UnrealBuildTool source code in Engine\Platforms\Hololens\Source\Programs\UnrealBuildTool\HoloLensProjectGenerator.cs line 87:

DirectoryReference? PlatformWinMDLocation = HoloLensPlatform.GetCppCXMetadataLocation(Compiler, "Latest", WindowsArchitecture.x64, Logger);

The "Latest" argument does the same as using Latest for the CompilerVersion: it excludes preview toolchains. Because it was hardcoded, it would always fail if only preview toolchains are available.

So to “fix” it, I simply changed that "Latest" to "Preview".

5 Likes