[MonoDevelop] Error with Generate Linq Class

Timothy Rhodes phoenixevolution at gmail.com
Sun Jun 10 17:48:30 UTC 2012


On Jun 10, 2012, at 11:49 AM, Timothy Rhodes wrote:

> Gianni,
> I'm not sure they have an offical solution on this. There is a work around where you can use the mysql .net library found at http://dev.mysql.com/downloads/connector/net/ . I installed The mysql.data library in the gac as MySql.Data. 
> I then changed the following line in the /Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/sqlmetal.exe.config file:
> 
> <provider name="MySQL" dbLinqSchemaLoader="DbLinq.MySql.MySqlSchemaLoader, System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" databaseConnection="ByteFX.Data.MySqlClient.MySqlConnection, ByteFX.Data" />
> 
> to
> 
> <provider name="MySQL" dbLinqSchemaLoader="DbLinq.MySql.MySqlSchemaLoader, System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" databaseConnection="MySql.Data.MySqlClient.MySqlConnection, MySql.Data, Version=6.5.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
> 
> This assumes you are using version 4.0 of .net and the version of MySql.Data is 6.5.4.0. 6.5.4 is the current version of the MySql Connector. 
> 
> After installing the MySql.Data.dll in your gac and changing the sqlmetal.exe.config line you should be able to run the Generate Linq command.
> 
> If you cannot you can always open terminal and run the following command:
> 
> sqlmetal --provider=MySQL --conn="Server=localhost;Database=database;Uid=username;Pwd=password;" --code:Data.cs --namespace=SimpleBlog.Data
> 
> you would have to change your Data for the database, username, password, code file and namespace. assuming you want to use a namespace.
> 
> I just did this on my mac for mysql. I'm running the same versions as you are for mono and monodevelop. This worked for me and I generated a LINQ to SQL class on friday. 
> 
> Timothy Rhodes
> 
> On Jun 10, 2012, at 8:04 AM, Gianni Valenti wrote:
> 
>> Hello,
>> I'm having some problems with Monodevelop and Generate Linq Class.
>> 
>> I use Max OSX Lion and I installed MonoDevelop-3.0.2 and MonoFramework-MDK-2.10.9_11.macos10.xamarin.x86.
>> 
>> I created a connection to a MySQL database server running locally on MAMP. The connection parameters are ok because the connection test succeeds.
>> 
>> However, when I try to run "Generate Linq Class" I got this error:
>> 
>> MonoDevelop.Database.Sql.SqlMetalExecException: sqlmetal: Could not load databaseConnectionType type 'ByteFX.Data.MySqlClient.MySqlConnection, ByteFX.Data'.  Try using the --with-dbconnection=TYPE option.
>> 
>> Could someone help me?
>> 
>> Thanks a lot.
>> 
>> --
>> Gianni
>> 
>> _______________________________________________
>> Monodevelop-list mailing list
>> Monodevelop-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/monodevelop-list
> 



More information about the Monodevelop-list mailing list