MvcBuildViews true with Entity Framework in ASP.NET MVC 2

前端 未结 6 850
伪装坚强ぢ
伪装坚强ぢ 2020-12-05 12:51

In VS 2010, changing true in a MVC2 project\'s .csproj file causes an error if you are using Entity Framework.

<
6条回答
  •  鱼传尺愫
    2020-12-05 13:42

    Not enough rep to add a comment. Wanted to mention that you need to add the 'System.Data.Entity.Design' assembly reference to the root Web.config. I was inadvertently trying to add it to a Web.config in my Views directory. Watch out for this pitfall.

提交回复
热议问题