I am trying to use EF migrations with MySQL dotconnect (7.2.122.0), but I get the following error when doing an "update-database".
No MigrationSqlGenerator found for provider 'Devart.Data.MySql'. Use the SetSqlGenerator method in the target migrations configuration class to register additional SQL generators.
What should I do?
No MigrationSqlGenerator found when using update-database
Re: No MigrationSqlGenerator found when using update-database
I did this
and it solved the problem.
However! I now get another error
It seems like devart is targeting the EF 4.4 and not the 5.0. In my I only have EF1 and EF4.
Any ideas?
Code: Select all
SetSqlGenerator(MySqlConnectionInfo.InvariantName,
new MySqlEntityMigrationSqlGenerator());
However! I now get another error
Code: Select all
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Code: Select all
c:\Program Files (x86)\Devart\dotConnect\MySQL\Entity\
Any ideas?
Re: No MigrationSqlGenerator found when using update-database
Please put the following bindingRedirect entry in the *.config file of your application:
Code: Select all
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="EntityFramework"
publicKeyToken="b77a5c561934e089" />
<bindingRedirect oldVersion="4.4.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>