Rider cannot resolve the DirectX symbol in Unreal Engine 5.2 .Build.cs files

Problem

In an Unreal Engine 5.2 project installed from the Epic Games Launcher, Rider and ReSharper C++ show these errors:

  • The Engine folder in the Explorer tool window is underlined with a red squiggle, and the underlined nodes lead to several .Build.cs files.
  • The .Build.cs files, for example Engine/Source/Developer/Windows/ShaderFormatD3D/ShaderFormatD3D.Build.cs, show Cannot resolve symbol 'DirectX'.
  • The Problems tool window lists the same Cannot resolve symbol 'DirectX' errors.

The project still builds. The bug is tracked in RSCPP-34310.

Cause

The Unreal Engine 5.2 installation from the Epic Games Launcher does not include the file Engine/Source/ThirdParty/Windows/DirectX/DirectX.Build.cs. The file is present in the Unreal Engine source repository on GitHub. Without it, the DirectX module cannot be resolved.

This is an Unreal Engine bug. According to RSCPP-34310, the launcher installation of Unreal Engine 5.3 includes the file.

Resolution

Upgrade the project to Unreal Engine 5.3 or later.

To stay on Unreal Engine 5.2, add the missing file:

  1. Download DirectX.Build.cs from the 5.2 branch of the Unreal Engine repository. The repository is private, so the link opens only for a GitHub account linked to an Epic Games account.
  2. Copy the file to Engine/Source/ThirdParty/Windows/DirectX/ in the Unreal Engine installation folder, for example C:\Program Files\Epic Games\UE_5.2\Engine\Source\ThirdParty\Windows\DirectX\.
  3. Regenerate the project files, then reopen the project in Rider.

The errors also appear only when Solution-Wide Error Analysis (SWEA) is on. SWEA works only in C# and Visual Basic, so turning it off does not affect C++ code analysis. To turn it off, go to Settings | Editor | Inspection Settings and clear Enable solution-wide analysis. For details, see Solution-wide analysis.

0 out of 0 found this helpful

Please sign in to leave a comment.

Have more questions?

Submit a request