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

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

问题描述

我工作的桌面应用程序用C#和数据库的MySQL。当我在我的机器上安装的安装程序,它工作正常,但是当我在其他机器上安装它的给予下列异常时,尝试访问数据库。我使用 MySQL.Data.dll 与MySQL进行通信。

  

无法加载文件或程序集MySql.Data,版本= 6.2.2.0,文化=中性公钥= c5687fc88969c44d或它的某一个依赖。该系统找不到指定的文件。

MySql.Data.dll 在present文件在Program Files文件夹项目的文件夹

其实,当我从它的文件夹中的程序运行文件,它运行正常,没有错误,但是当我试图从它在开始菜单快捷方式运行它,它给这个错误。

解决方案
  1. 是否在开始菜单中的快捷键设置正确的工作目录? (我怀疑这是最有可能的答案)

  2. 是否有不同的/不正确的版本MySql.Data.dll安装在GAC(全局程序集缓存)?我已经看到了在这之前给类似的错误消息。

I am working on Desktop application with c# and Data base MySQL. When I install its installer on my machine it works fine but when I install it on other machine its give following exception when try to access DB. I am using MySQL.Data.dll to communicate with MySQL.

Could not load file or assembly 'MySql.Data, Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.

and MySql.Data.dll file in present in Project's folder in Program files folder

Actually when I run it from its folder in Program file it run fine with no error but When i try to run it from its shortcut in Start Menu it gives that error.

解决方案

  1. Does the shortcut in the Start Menu set the working directory correctly? (I suspect that this is the most likely answer)

  2. Is there a different/incorrect version of MySql.Data.dll installed in the GAC (Global Assembly Cache)? I've seen this give similar error messages before.

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

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