Using Managed DirectX I was getting the following error:
An unhandled exception of type 'Microsoft.DirectX.Direct3D.InvalidDataException' occurred in System.Windows.Forms.dll Unhandled Exception: Error in the application.
On a very simple TextureLoader.FromFile(device, filePath) operation.
Now an exception like InvalidDataException made me double-check that TextureLoader.FromFile can open tga files, which it can. It turns out, though, that DirectX will throw an InvalidDataException if it CANNOT find the file. I would have expected a FileNotFoundException, but I guess not. And this is from the latest DirectX SDK (October 2005). So double-check your filePath to make sure there's a file there!