Tinkering with the solution's Platform selection is always wrong. It is a setting that only matters to C++ projects. Managed projects get compiled to assemblies that contain MSIL, they run on any platform. It is the jitter's job to take care of this, that happens at runtime and not at build time.
It does matter for C++ projects because they get compiled to the target architecture at build time. A 64-bit DLL or EXE generated from C++ code is very different from a 32-bit one, it contains very different machine code.
A pure managed solution should therefore have only one Platform selection. Which is "AnyCPU" in old VS versions. And again in new VS versions. Microsoft fumbled it badly at VS2010 when they started creating projects that have "x86" as the default Platform selection. Creating all sorts of misery with solutions that have a drastic mix of platforms when they got upgraded from an old version of VS.
Sounds like you've dug yourself an even deeper hole where the assemblies are getting built to bin\x64\debug but the reference assemblies are still pointing to bin\debug. No real idea how you did this, you must always use project references in a solution with multiple projects that depend on each other.
I recommend serious slash-and-burn to get this problem resolved:
- Use Build + Configuration Manager to delete extraneous platform selections until you have only one left.
- Delete reference assemblies in a project's Reference node and re-add them with Project + Add Reference, now using the Project tab.
- Right-click each project, Properties, Build tab. Every class library project must have its Platform Target setting at AnyCPU. Only the setting on the EXE project matters, that's the one that determines the bitness of the program. Favor AnyCPU there, if you have any dependency on native DLLs then choose between x86 and x64 to match their architecture.
- Switch to the Release build and repeat the previous step.