user1012598
user1012598

Reputation: 427

MySql.Data.dll version in Visual Studio 2010

I have an ASP.Net / c# web application running under framework 4.0, for some years now, using MySQL database.

I have recently being trying to implement reports, and have been trying to use for the first time the automated dataset wizard to create a new DataTable adapter. In running the wizard, I am able to set the datatable adapter and configure the sql statement. I am even able to execute and test it from the visual studio designer. I am also able to create a connection from the Server Explorer tab in Visual Studio and browse the database schema.

When I next try to compile the application, I get the following error:

"Error 1 Failed to generate code. Could not load file or assembly 'MySql.Data, Version=6.6.5.0, 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) C:\Projects\Sharpview V2\SharpView V2\App_Code\MCPS\DAL\dsCrewHistory.xsd 1"

Looking in my bin directory, the version I have is 6.4.3.0. Does this mean that I have to download MySQL.Data.dll version 6.6.5.0 and replace it in the bin file? Where can I download this version?

Upvotes: 0

Views: 3493

Answers (1)

Avinash Babu
Avinash Babu

Reputation: 6252

In the visual studio take the reference from the explorer and make sure that the Specific Version is set to false.

If you have an acces to the file web.config make changes to the file and remove version info.

You would need to open the project file with you fav text editor and make sure the version is not mentioned , then remove the line

, Version=6.5.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'

Please have a look here and here

Upvotes: 1

Related Questions