The reason for this error message is that Visual Studio starts the MsBuild.exe as 32-bit process. In this context the Enhancer.exe is being executed and it loads your assembly in order to obtain the metadata and inject the code needed to make your entities persistence capable. Your assembly is compiled as x64 and it cannot be loaded in 32-bit process. This issue appears only compile time.
To avoid this problem I would suggest you to move you data access layer (the entity classes and the OpenAccess Context) in separate project. This project you can compile as Any CPU. It will be enhanced correctly and later you can reference if from any project, regardless its platform (x32, x64 or Any CPU). Runtime OpenAccess ORM can work both in 32-bit and 64-bit processes.
I hope this helps. Please do not hesitate to get back to us if you have any other questions.
OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvements shipped with this release.