Here is some information about missing methods from pushing the SapientGuardian.EntityFrameworkCore.MySql v7.1.11 provider through NGen (similar to how I did for #6783):
Warning: System.MissingMethodException: Method not found: 'Void Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.Internal.ContainsTranslator..ctor()'. while resolving 0xa000023 - Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.Internal.ContainsTranslator..ctor.
Warning: System.MissingMethodException: Method not found: 'Void Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.Internal.EndsWithTranslator..ctor()'. while resolving 0xa000037 - Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.Internal.EndsWithTranslator..ctor.
Warning: System.MissingMethodException: Method not found: 'Void Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.Internal.StartsWithTranslator..ctor()'. while resolving 0xa00003a - Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.Internal.StartsWithTranslator..ctor.
Method not found: 'Void Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.Internal.ContainsTranslator..ctor()'. while compiling method MySqlContainsTranslator..ctor
Method not found: 'Void Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.Internal.EndsWithTranslator..ctor()'. while compiling method MySQLCompositeMethodCallTranslator..ctor
The cause is that we removed the parameterless constructors from string method translators in 5e1c562ae40c16ef49b90731fd015eccce0c1d44.
Creating this issue so that we can decide in triage whether we want to fix this for the same reason we reverted the removal of EntityTypeExtensions.DisplayName() (see https://github.com/aspnet/EntityFramework/issues/6914#issuecomment-257962521) or whether we want to apply the default bar for internal types.
I'm using the official provider for mysql, and have the same issue. Almost all operation throws MissingMethodException. It's fine on previous version of efcore. I also updated Microsoft.EntityFrameworkCore.Relational to 1.1.0, but doesn't make any sense.
Below is one of the operation's exception:
Method not found: 'Void Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommandBuilderFactory..ctor(Microsoft.EntityFrameworkCore.Infrastructure.ISensitiveDataLogger`1<Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommandBuilderFactory>, System.Diagnostics.DiagnosticSource, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper)'.
Here is my project.json:
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.EntityFrameworkCore": "1.1.0-*",
"Microsoft.EntityFrameworkCore.Relational": "1.1.0-preview1-final",
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview3-final",
"Microsoft.NETCore.App": {
"version": "1.1.0-preview1-001100-00",
"type": "platform"
},
"MySql.Data.EntityFrameworkCore": "7.0.6-IR31"
},
"tools": {
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview3-final"
},
"frameworks": {
"netcoreapp1.1": {
"imports": "dnxcore50"
}
}
}
@sweetwxh can you open an new issue and include a code listing we can run to see the error.
@sweetwxh were you able to get this working? I upgraded a project to 1.1 yesterday and got "Method not found" with the official MySQL provider. It's not clear to me what the fix is, which package update is necessary to overcome this problem?
UPDATE
It works fine using SapientGuardian.EntityFrameworkCore.MySql but rather a problem with MySql.Data.EntityFrameworkCore.
@mguinness I've passed this info on to the MySQL team, but you may also want to report it directly so that they can track how many folks are hitting it https://bugs.mysql.com/.
Any news? :(
@tobiashoeft Avoid MySql.Data.EntityFrameworkCore for now and use SapientGuardian.EntityFrameworkCore.MySql or Pomelo.EntityFrameworkCore.MySql instead.
Basically this issue is getting when I tried to implement method 'OnModelCreating' and using new feature .HasField for MySql database.
I go with normal implementation of mySql model without using new feature, it works.
I am using Pomelo.EntityFrameworkCore.MySql, as native MySQL library has some another issues like Data Annotations TableAttribute, ColumnAttribute
same error
Method not found: 'Void Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommandBuilderFactory..ctor(Microsoft.EntityFrameworkCore.Infrastructure.ISensitiveDataLogger`1<Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommandBuilderFactory>, System.Diagnostics.DiagnosticSource, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper)'.
MySql.Data.EntityFrameworkCore still die.
@geminiyellow See if Unable to run Migrations with EFCore 1.1.0 in MySQL resolves your issue.
@mguinness Your solution solves the problem at hand, but it seems like the beta still has a problem with the Transaction Commit. But thanks anyways! 馃憤
@mguinness That works great! Thank you! 馃槃
Most helpful comment
@tobiashoeft Avoid MySql.Data.EntityFrameworkCore for now and use SapientGuardian.EntityFrameworkCore.MySql or Pomelo.EntityFrameworkCore.MySql instead.