Solved

Help with Error: Could not load file or assembly MySql.Data.CF

Posted on 2014-07-22
4
1,862 Views
Last Modified: 2014-07-24
Hello,

I'm programming a mySQL related application in VS2010 Pro IDE on Win 8.1 with VB.net.  My program works great from inside the IDE, however, when I run it from the .exe it always encounters the following error:

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'MySql.Data.CF, Version 6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Open in new window

I'm pretty sure this has something to do with the fact that I previously used VS2013 Express for Desktop on this machine.  I wasn't happy with the new Express version, so I uninstalled it and installed this older version of VS2010 Pro.

Can you please help me figure out how to get rid of this error?  And be able to run stand-alone .exe version of this program?

Thanks,
Jason
0
Comment
Question by:SqueezeOJ
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
Kamal Khaleefa earned 500 total points
ID: 40213531
down vote accepted
      

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.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 40213822
When you run the exe directly, are you running it from the bin folder of the project or did you copy it elsewhere? And are you running it on the same machine?

Also, what version of .NET you start using in VS2013 and what version you are using in VS2010 now?
0
 

Author Closing Comment

by:SqueezeOJ
ID: 40214369
Thank you everyone for your comments & time.

King2002: Your mySQL download fixed the problem immediately.  I simply copied it into my mySQL directory and then changed the References in my project and now it runs.
0
 
LVL 16

Expert Comment

by:Kamal Khaleefa
ID: 40216496
:)
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question