不确定为什么它正在寻找实体框架,却无法找到它。完全消隐该怎么做。
在Windows窗体应用程序中,app.config
具有此
<section name="entityFramework"
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
我的web.config
包含
<assemblies>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</assemblies>
Form1中:
public Form1 (): base()
{
InitializeComponent();
MAXFMWebEntities context = new MAXFMWebEntities();
}
答案 0 :(得分:0)
更新了app.config 在Could not load file or assembly Microsoft.Data.OData Version=5.2.0.0 error in Azure Cloud Worker Role using Table Storage
中建议<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.4.0.0" newVersion="5.0.0.0" />
</dependentAssembly>