EDIT :
After finishing this post I ran into all sorts of other strange issues and restarted using a Web Appliction instead of a plain old Website. Between IntelliSense not showing any classes, to project reference issues, I couldn’t figured it out in time. I’m sure there’s a way, I just had to move on. So maybe this ramble below will be helpful for someone.
EFJust ran into something quirky with Visual Studio 2008′s new ADO.NET Entity Data Model wizard. While working on an ASP.NET 3.5 website ( not a codebehind web application ) I was trying to get the ADO.NET Entity Data model wizard to work with MySQL and ran into a probable Visual Studio bug. To sum up the issue, if you are going to add a new edmx to your project, do NOT save it to the App_Code folder initially. Put it in your root folder, compile your project, then move the edmx where you’d like.
Assuming you’ve already created your ASP.NET Website project, here’s how you reproduce this issue.
Right click your project and left click ‘Add New Item’
Select ADO.NET Entity Data Model, name it, select your language of preference
Click Yes to the ‘Store in App_Code’ prompt
Complete the new Entity Data Model wizard
See this tutorial if you have not done this before
Compile project after completing wizard
At this point your project should have a new.edmx file located inside of the App_Code folder, but the project won’t build without failing. If you are stuck in this predicament, follow this workaround.
Move .edmx to root folder and rebuild
After moving your edmx file to the root folder you should be able to compile without problem. Assuming this solves your problem, you should be able to move your edmx file to the App_Code folder without problem. Seems like an initial compile problem.






special post , really good view on the subject and very well written, this certainly has put a spin on my day, numerous thanks from the USA and keep up the good work
I found your blog on google and read a few of your other posts. I just added you to my Google News Reader. Keep up the good work. Look forward to reading more from you in the future.
THANK YOU so much! This was the exact problem I was having and your fix worked for me.