efcore: Method 'get_Info' in type 'MySql.Data.EntityFrameworkCore.Infraestructure.MySQLOptionsExtension' from assembly 'MySql.Data.EntityFrameworkCore' does not have an implementation
I have upgraded the SDK and runtime to 3.0, upgraded the packages in .csproj but bump into the exception:
System.TypeLoadException: Method 'get_Info' in type 'MySql.Data.EntityFrameworkCore.Infraestructure.MySQLOptionsExtension' from assembly 'MySql.Data.EntityFrameworkCore, Version=8.0.17.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' does not have an implementation.
Notice the spelling error in the namespace, Infraestructure
instead of Infrastructure
. Could that be the root cause?
Steps to reproduce
$ dn --info
.NET Core SDK (reflecting any global.json):
Version: 3.0.100
Commit: 04339c3a26
Runtime Environment:
OS Name: ubuntu
OS Version: 19.04
OS Platform: Linux
RID: ubuntu.19.04-x64
Base Path: /usr/share/dotnet-3.0.100/sdk/3.0.100/
Host (useful for support):
Version: 3.0.0
Commit: 7d57652f33
.NET Core SDKs installed:
3.0.100 [/usr/share/dotnet-3.0.100/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0 [/usr/share/dotnet-3.0.100/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0 [/usr/share/dotnet-3.0.100/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Further technical details
EF Core version: 3.0
Database provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer) MySql.Data.EntityFrameworkCore
Target framework: .NET Core 3.0
Operating system: Ubuntu 19.04
IDE: Visual Studio Code 1.38.1
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 4
- Comments: 26 (10 by maintainers)
THIS SUCKS!!!
@yasuoyuhao and others, just to clarify the current situation… There are two MySQL providers for Entity Framework Core:
In other words, if you want to use EF Core 3.0/3.1 with MySQL, at this point you need to use the Pomelo provider (or wait for the official MySQL one to get released).
Note that neither of these are provided by the EF team or tracked by this repo - any bugs or feature requests must be filed directly with its respective project.
MySql.Data.EntityFrameworkCore release new version 8.0.19, The situation has not changed.
Forget it. Too much unnecessary work. Either wait for donkey years before Oracle works it out or switch to https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/797
Note that version 3.0 of the Pomelo MySQL provider has already been released, so this problem should no longer occur. If anyone is still running into issues, please open a new issue on the Pomelo repository.
Below is the screenshot from the bug - https://bugs.mysql.com/bug.php?id=96990
And MySql.Data 8.0.20 is released on 27 April 2020
https://www.nuget.org/packages/MySql.Data/8.0.20
For anybody coming to this issue, please read this comment above explaining the situation.
Long story short, the EF Core team is not the maintainer of MySql.Data.EntityFrameworkCore - please communicate with them about releasing a newer version of their provider which supports EF Core 3.1. As an alternative, consider switching to Pomelo.EntityFrameworkCore.MySql which is a full-featured EF Core MySQL provider supporting 3.1 (also not maintained by this team).
Posting further comments here won’t help the situation in any way…
try out these steps:
remember that Entity framework packages can be conflicts with other Entity framework packages so try one at a time and remove another because somtimes dot.net core provide preinstalled EntityFramework.Core.SqlServer
@ifew - You will need to wait for MySQL provider which works with EF Core 3.0. Till that is released, you would need to stick to version 2.2