我完全不知所措 - 我遇到了超级奇怪的问题,我仍然不明白......我正在运行 Entity Framework 4.1、MySql 5.xx,我的 MySql Connector 是 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 版本的随机引用,但我什么也没找到!
我很迷失,无处可去。我非常感谢对此的任何指导,提前非常感谢。
您必须将提供程序库添加到 Web 应用程序中的 bin 目录中,并且注册提供商在你的 web.config 中
然后你必须下载连接器.Net Mono 这里.
并将Dlls放入bin文件夹中。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)