2

I created project/app on one computer where I had MySql.Data.MySqlClient. Now I want to change/run program on another computer where I also installed and again added MySql.Data.MySqlClient to project but when I try

using MySql.Data.MySqlClient;

I still get error that it cant find MySql.Data.MySqlClient. How to resolve this ?

1
  • If you think my answer help you to come up with a solution, you can mark it as answer. Thank you. Commented Jun 11, 2015 at 8:23

4 Answers 4

5

I have a similar application running with WPF (C#. Net) and MySQL with entity.

1st: You have to install MySQL Connector to your development PC, then add MySQL.Data.dll to your references.

2nd: You have to set the property of the MySQL.Data.dll Keep local = "True". Again, this is important since if you install your application to other computer, they need to install also the MySQL Connector. With this, they don't need to install it.

Sign up to request clarification or add additional context in comments.

Comments

0

Are you sure the reference is updated? Check the path to the library by right clicking on the Library under References (in the Solution Explorer) and see the Properties. There is a Path value that should be correct for you pc.

If it is not, try to remove the reference and add it again.

Comments

0

you have to install mysql-connector-net and add reference in your project

check this link for mysql connector

Steps

Install mysql-connector-net

Right-click on References, select Add Reference.

Select .NET tab. Check what the text directly under the tabs says, example: "Filtered to: .NET Framework 4 Client Profile".

Click on the Browse tab.

Browse to the MySql folder and go on into the Assemblies folder, example: C:\Program Files (x86)\MySQL\Connector NET 6.8.3\Assemblies

Select the version folder

Add MySql.Data.dll

Comments

0

I checked paths and for some reason didnt work,perhaps I missed somthing. Solved it with Package Manager Console and Install-Package MySql.Data command. Now I have it Local,thanks for the tip Christian Mark

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.