I got it working by building it as a 32 bit application.
To do this, right click on the project, select properties, and go to the build tab. Change platform target from any to x86 to specify it as a 32-bit application.
Might not be an ideal fix for you, but it's a lot better than saying 'this isn't the correct forum', especially when this is Google's first hit.