I’ve recently started to play with the new ADO.Net Entity Framework.
This is bleeding edge stuff (Beta/CTP) from Microsoft so I wasn’t too
surprised when I started hitting a few issues with the tools and VS
2008. As expected there isn’t a great deal of useful documentation out
there yet (just the same basic stuff over and over again) which meant
when I hit these issues there wasn’t a lot of answers out there. I
thought I’d start blogging about issues I come across.
Here’s issue number one for me
When I copy an .edmx file from one project to another manually the
.csdl, .msl, and .ssdl files aren’t created on compile neither is the
code behind re-generated
- solution explorer > click on the EDMX file > ‘custom tool’ =
This auto re-generates the class from the EDMX file (CSDL more
accurately I think)
- project properties > compile > click ‘build events’ > ‘edit
post-build’ and paste the following including all double-quotes
“%windir%\Microsoft.NET\Framework\v3.5\EdmxDeploy.exe” ”$(ProjectDir) ”
this re-generates the .csdl etc. into the output dir on project build.