我在项目中创建了一个基于SQL Server表的实体模型。我在点击按钮时写获取操作。当我第一次打开页面时,它对我来说很好。但点击按钮我会得到以下错误:
Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
我试着放
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
在app.config中,但它不能解决问题。
我找到了这个对我有效的解决方案。
基本上转到引用部分的实体框架,转到它的属性并选择"Copy Local"="True"。
归功于Respuestas/Jambor