A project is not being created in Unreal Engine 5



Discovering modules, targets and source code for project...
Binding IntelliSense data...
Binding IntelliSense data... 100%
Writing project files...
Available x64 toolchains (7):
 * C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.36.32530
    (Family=14.36.32530, FamilyRank=2, Version=14.36.32530, Is64Bit=True, Preview=True, Architecture=x64, Error=False)
 * C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.33.31629
    (Family=14.33.31629, FamilyRank=1, Version=14.33.31631, Is64Bit=True, Preview=True, Architecture=x64, Error=False)
 * C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.32.31326
    (Family=14.32.31326, FamilyRank=2, Version=14.32.31336, Is64Bit=True, Preview=True, Architecture=x64, Error=False)
 * C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.31.31103
    (Family=14.31.31103, FamilyRank=2, Version=14.31.31107, Is64Bit=True, Preview=True, Architecture=x64, Error=False)
 * C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.30.30705
    (Family=14.30.30705, FamilyRank=2, Version=14.30.30712, Is64Bit=True, Preview=True, Architecture=x64, Error=False)
 * C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.29.30133
    (Family=14.29.30133, FamilyRank=0, Version=14.29.30148, Is64Bit=True, Preview=True, Architecture=x64, Error=False)
 * C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.16.27023
    (Family=14.16.27023, FamilyRank=2, Version=14.16.27049, Is64Bit=True, Preview=True, Architecture=x64, Error=True)
Writing project files... 0%
Unable to find valid latest C++ toolchain for VisualStudio2022 x64



How to fix the error?

Greetings @MopKes666

Welcome to the forums! I saw this issue in another post earlier this year and the poster seemed to find a solution for what was causing the problem. Here’s the link to that thread. I hope it’s helpful!

Hey folks, this issue is still happening in 5.2. For me it happens when creating a new C++ project from scratch. You can see it finds a 14.30 version but still fails.

Generating VisualStudio2022 project files:
Discovering modules, targets and source code for project...
...
 * C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705
    (Family=14.30.30705, FamilyRank=2, Version=14.30.30712, Is64Bit=True, Preview=False, Architecture=x64, Error=False)
Unable to find valid 14.30 toolchain for VisualStudio2022 x64

I made sure that the correct versions are installed in Visual Studio Installer

@FrostyJas I see there’s another thread that suggest editing a source file, but that didn’t work for me.

Does anyone see a simpler fix?

I have sort of the exact same problem with 14.32, Unreal detects 14.32 but refuses to use it. And it doesn’t want to use other versions if not installed.

If that can help, the error is line 551 of MicrosoftPlatformSDK.cs:

else if (VersionNumber.TryParse(CompilerVersion, out VersionNumber? ToolChainVersion))
{
	ToolChain = SelectToolChain(ToolChains, x => x.ThenByDescending(x => x.Version == ToolChainVersion).ThenByDescending(x => x.Family == ToolChainVersion), Architecture);
	if (ToolChain == null || !(ToolChain.Version == ToolChainVersion || ToolChain.Family == ToolChainVersion))
	{
		DumpToolChains(ToolChains, x => x.ThenByDescending(x => x.Version == ToolChainVersion).ThenByDescending(x => x.Family == ToolChainVersion), Architecture, Logger);
		throw new BuildException("Unable to find valid {0} toolchain for {1} {2}", ToolChainVersion, Compiler, Architecture.ToString());
	}
}

Ok I have resolved my problem, maybe it will work for you too:

  1. Find your BuildConfiguration.xml like described on this stackoverflow answer.
  2. Delete it

Thats it it have worked for me.
It was because the preferred version was defined due to a previous UE install, so maybe Unreal Engine in this case try not other versions.

3 Likes

Good shout, I managed to fix mine by deleting C:\Users\user\AppData\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml