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!
You can resolve this MVC compile issue by adding the following element to your web.config file:
<add assembly="System.Data.Entity.Design, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
This will tell the compiler where to find that missing type.
i had this problem too, and figured out that i had created some entity files (edmx and the like) but had deleted them.
this problem only started happening after i had created these files. on inspection of the application folders, i found that visual studio hadn't actually 'deleted' them off the drive, it had just 'deleted' them out of the project. therefore, when the project was being compiled, it saw this edmx file and decided it would include it. hence the error.
easy fix - permanently delete the entity files off the drive!