Tried all of these to no avail, but eventually discovered that one of the projects had a build configuration set to x64 instead of Any CPU. Changing this fixed the issue