Solved

MySQL/.Net Connector problem

Posted on 2008-06-11
4
1,325 Views
Last Modified: 2008-06-12
Hi esperts.
I am migratin an application developed on VS express 2005 with a MySql database.
When trying to compile the app in the new computer I get the following error:

An error occurred creating the form. See Exception.InnerException for details.  The error is: Could not load file or assembly 'MySql.Data, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.

Any idea what the problem is?The file is in its correct place in the /program files/mysql........... directory, just as itr says in the "references"
Regards
0
Comment
Question by:howtodoit
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
Solar_Flare earned 250 total points
ID: 21766091
do you have the MySQL connector installed on the new machine?

you might also need to remove the reference and add it again with the new file location if the dll file's location is different on the new machine.


you can also copy the MySQL connector dll into the bin folder of your project.
0
 
LVL 18

Assisted Solution

by:philipjonathan
philipjonathan earned 250 total points
ID: 21767380
Seems like you have different version of MySql connector installed.
Easiest way to solve it is, find the Mysql.Data.dll in the Mysql connector installation folder on your development machine, and copy it together with your compiled exe files during the migration.
0
 

Author Comment

by:howtodoit
ID: 21771157
I moved the dll as suggested by philip and still cant compile, but the error has changed:

An error occurred creating the form. See Exception.InnerException for details.  The error is: Could not load file or assembly 'MySql.Data, Version=1.0.7.30072, 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)
0
 
LVL 15

Expert Comment

by:Solar_Flare
ID: 21775199
install the MySql connector on the new machine, remove the reference to MySql from the project, then add it again, locating the MySql.Data.dll that was just installed.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

808 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