Generating project files from source on 5.7 with Visual Studio 2026

Issue

If, like me, you uninstalled VS 2022 after installing VS 2026, you’ll get the following error when generating project files or loading the Default.uprojectdirs file on Rider to launch the UE5 source project:

Visual Studio 2022 x64 must be installed in order to build this target.

Cause

UE 5.7 does recognize VS 2026 in its project generation just fine. However, the DatasmithMaxExporter plugin is overwriting the WindowsCompiler in its DatasmithMax2017.Target.cs file to VS 2022. As soon as file generation gets to that plugin, the UnrealBuildTool tries to setup compilation with VS 2022 and fails, cancelling the project file generation.

Fix

Open DatasmithMax2017.Target.cs and delete the lines setting WindowsPlatform.Compiler:

WindowsPlatform.Compiler = WindowsCompiler.Clang;
WindowsPlatform.Compiler = WindowsCompiler.VisualStudio2022;

After deleting those lines, starting at line 33, the file should look like this:

	if (!Directory.Exists(MaxSDKLocation))
	{
	}

	Console.WriteLine("Skipping " + MaxSDKLocation);
	AdditionalCompilerArguments += " -Xanalyzer,-isystem-after" + MaxSDKLocation;
}
else
{
	AdditionalCompilerArguments += " /Zc:referenceBinding- /Zc:strictStrings- /Zc:rvalueCast- /Zc:preprocessor-";
}

WindowsPlatform.bStrictConformanceMode = false;
WindowsPlatform.bStrictPreprocessorConformance = false;

Save it. Then try re-opening it on Rider or generating project files again and it works.

I did worry about breaking something when making that change. But no other .Target.cs or Build.cs files override the compiler like that. The only similar thing is another Datasmith file reading the current compiler to conditionally change its build behavior. So, I’m 99% confident this won’t break anything (can’t be 100% confident of anything in coding lol).