Telerik Forums RSShttps://www.telerik.com/urn:uuid:b6603428-8392-4ee9-beea-eb03e8007214https://www.telerik.com/forums/permalink/KDRgtpKD6U6-6usD6AByFAUnable to compile 64-bit assembly that contains OpenAccess ORMThank you for the explanation!&nbsp; Your suggestion solved my issue perfectly.urn:uuid:8060b488-99cc-4941-8baa-9b6dded8d7f7https://www.telerik.com/forums/permalink/iLRggMyZQUmLqptt3tjX9wUnable to compile 64-bit assembly that contains OpenAccess ORMHello Matt,
<p>The reason for this error message is that Visual Studio starts the MsBuild.exe as 32-bit&nbsp;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.&nbsp;<br />
<br />
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 &nbsp;64-bit processes.<br />
<br />
I hope this helps. Please do not hesitate to get back to us if you have any other questions.<br />
&nbsp;</p>
Regards,<br />
Kaloyan Nikolov <br />
Telerik
<div class="forumBaloonTop"></div>
<div class="forumBaloon">OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. <span style="color: #e64b00;">Check out the list of <a href="http://www.telerik.com/products/orm/whats-new.aspx">new functionality and improvements</a> shipped with this release.</span> </div>
<div class="forumBaloonBottom"></div>urn:uuid:bf0dd1d3-1539-497d-a92c-fa5279f560c5https://www.telerik.com/forums/permalink/09ENvzkVfUmpLPpSefVgxQUnable to compile 64-bit assembly that contains OpenAccess ORMHello,<br />
<br />
When I attempt to compile my assembly for a 64-bit platform I get the following error:<br />
<br />
<strong>The specified assembly [my dll] cannot be loaded.<br />
<br />
The problem might be that the enhancer runs in a .NET framework 2.0 vm and the assembly to enhance is a .NET 4.0 assembly<br />
or you are trying to enhance a x86 assembly in a 64 bit process or a x64 assembly in a 32 bit process.<br />
<br />
Please change the required version inside the enhancer.exe.config or venhance.exe.config or switch to 'Any CPU' for this project.</strong><br />
<br />
I'm using VS2010 and OpenAccess ORM Q2 2013 SP1. I do not get this error when I compile for a 32-bit platform.&nbsp; Does this mean that OpenAccess ORM cannot be used in a 64-bit assembly?<br />
<br />
In addition, 'Any CPU' is not an option I can use due to dependencies I need to use in my application.