MvcBuildViews true with Entity Framework in ASP.NET MVC 2 MvcBuildViews true with Entity Framework in ASP.NET MVC 2 asp.net asp.net

MvcBuildViews true with Entity Framework in ASP.NET MVC 2


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.


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!


Alternately you can remove the build provider.

<system.web>  <compilation debug="true" targetFramework="4.0">    <buildProviders>      <remove extension=".edmx"/>    </buildProviders>  </compilation></system.web>