For users of WinXP Pro x64 that want to run Managed DirectX code with Visual Sudio 2005 (also applicable to the XNA framework) -any version, take due note that there are two possible ways to avoid the nasty "Bad image format" exception.
As mentioned in Benjamin Nitschke's blog, the first one, is by modifying the "csproj" file with the notepad. Just locate and open the file and then add the following line:
<PlatformTarget>x86</PlatformTarget>
(if the "node" already exists, just replace it with the above-mentioned one).
The second one, is by using VS IDE it-self. Following this link for further instructions.
Stay tuned!