I have generated a DAL layer with Subsonic2.2 for a .NET4.0 application, using c# and mysql. Yet when I use a Collection, i have this exception on this line:
AnagraficaCategorieCollection a = new AnagraficaCategorieCollection().Load();
telling me that it cannot load or find assembly MySql.Data, version 5.2.3.0.
My project references a newer version. How can I possibly solve that?
The solution is to use an assembly redirect, which tells the framework to use a newer version of MySql.Data. To add the redirection, put this in your web/app.config:
Note that you may need to change the version numbers to match your current assembly.