Saturday, May 23, 2015

Remember to include MySql.Data.dll

After I have uploaded the files to server, created the database and tables, when I accessed the website, I got the following error:

"Could not load file or assembly 'MySql.Data, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified."

Solution:
1. Go to the project.
2. Go to Reference folder, select MySql.Data.
3. Select True for Copy Local.
4. Then copy the bin folder (MySql.Data.dll is included) over to the server.


No comments:

Post a Comment