运行构建.NET应用程序这需要MySql.Data [英] Running a built .NET application which required MySql.Data

查看:173
本文介绍了运行构建.NET应用程序这需要MySql.Data的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

林有一个问题,运行这是我写的一个内置.NET应用程序:

Im having a problem running a built .NET application which I wrote:

我的应用程序使用的是安装在我的系统上最新的MySQL连接器,并显示为一个.NET 4 Framwork组件,当我尝试添加它作为参考。

My application uses the latest MySql connector which is installed on my system and shows up as a .NET 4 Framwork component when I try to add it as a reference.

当我运行我在调试模式下的应用程序的一切伟大工程的环境, 但是当我尝试直接从释放文件夹中运行它作为一个独立的应用程序,我得到以下异常:

When I run my application in debug mode in the environment everything works great, but when I try to run it as a stand alone application straight from the "release" folder, I get the following exception:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass
embly 'MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969
c44d' or one of its dependencies. The system cannot find the file specified.

任何想法,我怎么能解决这个问题?

Any idea how can I solve this?

推荐答案

尝试:

  1. 在重建使用发布配置和检查,以确保MySQL.Data.dll是在你的发行版文件夹中。
  2. 右键单击该MySQL.Data参考,选择属性,并确保复制本地设置为true。
  3. 清洁并再次重建,并再次检查release文件夹。

这听起来像你的程序集是在全局程序集缓存,但不被随您的应用程序生成的输出。

It sounds like your assembly is in the global assembly cache but is not being shipped with your application build output.

这篇关于运行构建.NET应用程序这需要MySql.Data的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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