Reputation: 13
I built an online login program which connects to my online MySQL db. In my application i have used the MySQL.Data file as a reference since the program needed the file to connect to the online MySQL server. Now my question; when I take my program from 'C:\Users\User\Documents\Visual Studio 2010\Projects\MYPROJECT\MYPROJECT\bin\Debug' and copy that file to a completely other computer, I get an error message saying that the MySQL.Data file is missing. I want to know how I can include the MySQL.Data file in my project compile. If you need further details I am happy to provide them.
Upvotes: 0
Views: 1251
Reputation: 2776
In the Solution Explorer of your project, you have the point References, where the MySql.Data.dll
should occur. Right-click it and select Properties, and in the Properties make sure that Copy Local is set to True
.
Then, the MySql.Data.dll
file will always be copied to your bin/Debug
folder.
If you deploy your program, you have to copy that dll, too. Then everything will work on the other computer.
Upvotes: 1
Reputation: 33738
You can build a setup project (installer), or copy the mysql.data.dll file with your exe (basicly everything in your bin/{config} directory).
Upvotes: 0