MvcBuildViews true with Entity Framework in ASP.NET MVC 2
asp.net, asp.net-mvc, csproj, entity-framework
Solution
You can resolve this MVC compile issue by adding the following element to your web.config file:
<add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
This will tell the compiler where to find that missing type.
Problem
In VS 2010, changing `<MvcBuildViews>true</MvcBuildViews>` in a MVC2 project's .csproj file causes an error if you are using Entity Framework. Could not load type 'System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider'. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config 129 I want to build views while I'm debugging, and I also want my project to compile!