D3DX9_42.dll is part of the D3DX9 helper library from the DirectX June 2010 release. Older games built against it need those DirectX 9 era files, which modern Windows does not include, so the error appears on a new PC even though DirectX 12 is installed.
dxwebsetup.exe). It adds the June 2010 libraries side by side and does not touch DirectX 11 or 12. Restart the PC when done._CommonRedist/DirectX and run DXSETUP.exe there, which installs exactly the libraries that game expects.If the error names a different D3DX9 file, for example D3DX9_43.dll, the same runtime covers it, since the June 2010 package installs the whole D3DX9 set. If the game still fails, reinstall it cleanly, since a damaged game folder can keep failing next to a healthy runtime.
I have DirectX 12, why is a DirectX 9 file missing? The version number only covers the core components. D3DX9 is an optional helper library from the old DirectX SDK, and Windows Update does not provide it. The DirectX End-User Runtime is what adds it.
What if the error names D3DX9_43.dll instead? The same fix covers it. The June 2010 runtime installs the whole D3DX9 set, so one install fixes every numbered D3DX9 file.