无法加载文件或程序集'MySql.Data,Version = 6.3.6.0 [英] Could not load file or assembly 'MySql.Data, Version=6.3.6.0

查看:1159
本文介绍了无法加载文件或程序集'MySql.Data,Version = 6.3.6.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个完全的损失 - 我有甚么我甚至不明白的超级wierd问题我正在运行Entity Framework 4.1,MySql 5.xx和我的MySql连接器是v 6.4.4 - 每当我上传到我收到的服务器时,一切都在当地工作,但是每次上传到我收到的服务器:

 无法加载文件或程序集MySql.Data Version = 6.3.6.0,Culture = neutral,PublicKeyToken = c5687fc88969c44d'或其依赖关系之一。找到的程序集的清单定义与程序集引用不匹配。 (HRESULT异常:0x80131040)
说明:执行当前Web请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误的更多信息及其在代码中的起始位置。

异常详细信息:System.IO.FileLoadException:无法加载文件或程序集MySql.Data,Version = 6.3.6.0,Culture = neutral,PublicKeyToken = c5687fc88969c44d或其一个依赖关系。找到的程序集的清单定义与程序集引用不匹配。 (HRESULT的异常:0x80131040)

源错误:

行48:///使用在proventradesEntities部分中找到的连接字符串初始化一个新的proventradesEntities对象应用配置文件。
第49行:///< / summary>
第50行:public proventradesEntities():base(name = proventradesEntities,proventradesEntities)
第51行:{
第52行:this.ContextOptions.LazyLoadingEnabled = false;


源文件:e:\web\proventrade\htdocs\App_Code\ProvenTrades.Designer.cs行:50

装配跟踪:以下信息有助于确定无法加载程序集MySql.Data,Version = 6.3.6.0,Culture = neutral,PublicKeyToken = c5687fc88969c44d的原因。

WRN:程序集绑定日志记录已关闭。
要启用程序集绑定失败日志记录,请将注册表值[HKLM\Software\Microsoft\Fusion!EnableLog](DWORD)设置为1。
注意:与程序集绑定有关的一些性能损失故障记录。
要关闭此功能,请删除注册表值[HKLM\Software\Microsoft\Fusion!EnableLog]。

我很困惑,我肯定我的Bin目录中有MySql 6.4.4 dll,也是我的Web.config使ZERO参考6.3.6版本 - 我搜索了整个项目(使用全局查找)为6.3.6,甚至只是为了MySql查看是否可以找到任何随机引用到这个流氓6.3.6版本,但我找不到任何东西!



我很迷失,没有在哪里。我将非常感谢任何关于这一点的指导,非常感谢您提前。

解决方案

您必须将提供程序库添加到您的web应用程序和注册提供商在您的web.config中



然后您必须下载Connector 。Net Mono here



并将Dll放入bin文件夹。


I'm at a COMPLETE loss - I'm having super wierd issues with what I still really dont even understand... I'm running Entity Framework 4.1, MySql 5.xx and my MySql Connector is v 6.4.4 - everything works beatifully locally however whenever I upload to the server I receive:

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].

I am SO confused, I am positive that I have MySql 6.4.4 dll's in my Bin directory, also my Web.config makes ZERO references to version 6.3.6 - I've searched my entire project (using global find) for 6.3.6 and even just for MySql to see if I can find ANY random references to this rogue 6.3.6 version but I find nothing!

I'm so lost and am getting no where. I would GREATLY appreciate any guidance on this, thanks so much in advance.

解决方案

You must add provider library to bin directory in your web application and register provider in your web.config

Then You must download Connector .Net Mono here.

And put Dlls into bin folder.

这篇关于无法加载文件或程序集'MySql.Data,Version = 6.3.6.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆