schambers/fluentmigrator — Issue #236: migrate.exe fails: Could not load type 'MySql.Data.MySqlClient.MySqlClientFactory
Author: dnajd
Created: 2012-01-31 08:29:49+00:00
State: open

The Command I'm running:
----------------------------------------
exec /usr/local/bin/mono Migrate.exe /provider mysql /connection "Server=localhost; Initial Database=test; Uid=testuser; Pwd=password" /target /home/user/MyMigrations.dll

The error I get:
----------------------------------------
!! An error has occurred. The error is:
System.TypeLoadException: Could not load type 'MySql.Data.MySqlClient.MySqlClientFactory'.
at (wrapper managed-to-native) System.Reflection.Assembly:InternalGetType (System.Reflection.Assembly,System.Reflection.Module,string,bool,bool)
at System.Reflection.Assembly.GetType (System.String name, Boolean throwOnError, Boolean ignoreCase) [0x00000] in :0
at System.Activator.CreateInstance (System.String assemblyName, System.String typeName, Boolean ignoreCase, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Security.Policy.Evidence securityInfo) [0x00000] in :0
at System.Activator.CreateInstance (System.String assemblyName, System.String typeName, System.Object[] activationAttributes) [0x00000] in :0
at System.Activator.CreateInstance (System.String assemblyName, System.String typeName) [0x00000] in :0
at System.AppDomain.CreateInstance (System.String assemblyName, System.String typeName) [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstance (string,string)
at System.AppDomain.CreateInstanceAndUnwrap (System.String assemblyName, System.String typeName) [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string)
at FluentMigrator.Runner.Processors.ReflectionBasedDbFactory.CreateFactory () [0x00000] in :0
at FluentMigrator.Runner.Processors.DbFactoryBase.get_Factory () [0x00000] in :0
at FluentMigrator.Runner.Processors.DbFactoryBase.CreateConnection (System.String connectionString) [0x00000] in :0
at FluentMigrator.Runner.Processors.MySql.MySqlProcessorFactory.Create (System.String connectionString, IAnnouncer announcer, IMigrationProcessorOptions options) [0x00000] in :0
at FluentMigrator.Runner.Initialization.TaskExecutor.InitializeProcessor (System.String assemblyLocation) [0x00000] in :0
at FluentMigrator.Runner.Initialization.TaskExecutor.Initialize () [0x00000] in :0
at FluentMigrator.Runner.Initialization.TaskExecutor.Execute () [0x00000] in :0
at FluentMigrator.Console.MigratorConsole.ExecuteMigrations (IAnnouncer announcer) [0x00000] in :0
at FluentMigrator.Console.MigratorConsole.ExecuteMigrations () [0x00000] in :0
at FluentMigrator.Console.MigratorConsole..ctor (System.IO.TextWriter announcerOutput, System.String[] args) [0x00000] in :0

Server details
----------------------------------------
> uname -a
FreeBSD server.domain.org 8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3 #0: Tue Sep 27 18:45:57 UTC 2011 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64

installed:
mysql-client-5.5.20
mysql-server-5.5.20
mono-2.10.6