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.
Asked
Active
Viewed 1,241 times
0
-
~~~~~~This is VB 2010~~~~~~ – Milad Shkoh Jan 28 '13 at 22:29
2 Answers
1
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.

Desty
- 2,684
- 21
- 28
-
Hi mate, thanks :D but is there are way which I can compile the MySQL.DLL file into the program? because it will be quite annoying copying 2 files for users.. – Milad Shkoh Jan 28 '13 at 22:32
-
If you want something like that, have a look here: http://stackoverflow.com/questions/476993/can-i-include-dll-in-exe-in-visual-studio – Desty Jan 28 '13 at 22:39
0
You can build a setup project (installer), or copy the mysql.data.dll file with your exe (basicly everything in your bin/{config} directory).

Sam Axe
- 33,313
- 9
- 55
- 89
-
Hi, I only have 2 folders inside my bin directory, Debug & Release (The release folder is empty) btw this is VB 2010 – Milad Shkoh Jan 28 '13 at 22:29