"Not a valid DLL" VST error

I'm building a 64-bit VST file. Everything compiles fine, but I can't load the plug in any DAWs. I loaded it up in VST-Scanner and it gives me the error "This file is not a valid DLL." Has anyone encountered this before? I'm not really even sure where to start looking with something like this. Any thoughts would be appreciated. Thanks.

Just an idea, build the PluginHost demo, and try it with that. Does it work, can you debug it?