Compiler Error Message: CS0012: The type 'System.Data.Objects.DataClasses.EntityObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

 

头次碰到这个问题,google结果,需要修改web.config文件

添加配置节点

<configuration>
  <system.web>
    <compilation>
      <assemblies>
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral,PublicKeyToken=b77a5c561934e089"/>
      </assemblies>
    </compilation>
  </system.web>
</configuration>

 

 

 

http://stackoverflow.com/questions/1501616/is-the-combination-of-ado-net-entity-framework-and-asp-mvc-wrong-by-any-chance

http://stackoverflow.com/questions/3219412/strange-compilation-error-in-entity-framework-and-mvc-application

相关文章:

  • 2022-12-23
  • 2021-10-14
  • 2021-10-11
  • 2021-05-28
  • 2022-12-23
  • 2021-06-16
  • 2021-07-21
猜你喜欢
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
  • 2021-10-06
  • 2022-12-23
相关资源
相似解决方案