Yet another note for future reference. If you are using SlimDX, and you get the exception:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
SlimDX.Direct3D9.Direct3DX9NotFoundException was unhandled Message=Direct3DX 9 was not found. Please install the latest DirectX end-user redistributable package from Microsoft. Source=SlimDX StackTrace: at SlimDX.Direct3D9.Direct3D..ctor() InnerException: System.Runtime.InteropServices.SEHException Message=External component has thrown an exception. Source=SlimDX ErrorCode=-2147467259 StackTrace: at D3DXCheckVersion(UInt32 , UInt32 ) at SlimDX.Direct3D9.Direct3D..ctor() InnerException: |
when trying to create a SlimDX.Direct3D9.Direct3D object, most likely you will be able to solve this by placing D3DX9_43.dll into your output folder. Please note that the proper solution would be to install the full DirectX 9 runtime into your system, but it may be too much for some quick testing.
A similar error may occur when using SharpDX, but in SharpDX’s case, the error message will be much more helpful and actually tell you what is missing.