【发布时间】:2012-03-02 02:50:24
【问题描述】:
我完全不知所措 - 我遇到了非常奇怪的问题,我什至还真的不明白……我正在运行 Entity Framework 4.1、MySql 5.xx 并且我的 MySql 连接器是 v 6.4.4 - 一切都在本地正常运行,但是每当我上传到我收到的服务器时:
Could not load file or assembly 'MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line 48: /// Initializes a new proventradesEntities object using the connection string found in the 'proventradesEntities' section of the application configuration file.
Line 49: /// </summary>
Line 50: public proventradesEntities() : base("name=proventradesEntities", "proventradesEntities")
Line 51: {
Line 52: this.ContextOptions.LazyLoadingEnabled = false;
Source File: e:\web\proventrade\htdocs\App_Code\ProvenTrades.Designer.cs Line: 50
Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
我很困惑,我很肯定我的 Bin 目录中有 MySql 6.4.4 dll,而且我的 Web.config 对版本 6.3.6 进行了零引用 - 我已经搜索了我的整个项目(使用全局查找)对于 6.3.6 甚至只是为了 MySql 看看我是否可以找到任何随机引用这个流氓 6.3.6 版本,但我什么也没找到!
我迷路了,无处可去。非常感谢您对此提供任何指导,非常感谢。
【问题讨论】:
-
您可以尝试重定向程序集版本。 msdn.microsoft.com/en-us/library/7wd6ex19(v=vs.71).aspx
-
我忘了在上面提到我已经尝试过但没有成功 - 它太奇怪了,让我发疯
标签: asp.net mysql entity-framework entity-framework-4.1 mysql-connector