OpenAccess Enhancer and Visual Studio 2010
Apr
18
Written by:
4/18/2010 9:21 AM
Visual Studio 2010 has been released!!! I've been trying to upgrade my Visual Studio 2008 projects so that I can start using 2010 and all the wonderful new features. A couple of my projects that used Telerik Open Access ORM failed to build in Visual Studio 2010. They build fine in 2008 but not 2010!
Visual Studio 2010 could not reference any project that was enhanced by Open Access ORM. I kept banging my head on the wall for hours until I ran across this simple fix!
I was trying to build my projects to .Net 3.5 but for some reason Visual Studio kept producing .Net 4.0 assemblies. The problem is within Open Access ORM and the enhancer, not Visual Studio 2010.
I found this blog post and forum post that describe the issue:
http://blogs.telerik.com/toddanglin/posts/09-12-15/working_with_openaccess_in_visual_studio_2010_beta_2.aspx
http://www.telerik.com/community/forums/orm/general-discussions/openaccess-enabling-an-assembly-in-vs2010-forces-it-to-use-net-4-0.aspx
It turns out the fix is REALLY simple.
All we need to do is add this string to the "POST-BUILD" actions in your project properties.
"c:\programs files\telerik\openaccess orm\sdk\venhance.exe" "-assembly:$(TargetPath)"
The next step is to turn off enhancing. Select your project and open the properties window. Simply set "Enhance" to false.
The next time you build your assembly it should be compiled to .Net 3.5.
Although this is not the greatest fix from what I have read, it is a fix. I am sure this is on Telerik's todo list for fixes since its posted on there Company Blogs & Forums. Its too bad that I had to spend 2 hours on this! I guess ORM does not have full Visual Studio 2010 support yet!