Bug #96990 Method 'get_Info' missing from MySql.Data.EntityFrameworkCore 8.0.17.0
Submitted: 24 Sep 2019 8:46 Modified: 18 Feb 20:27
Reporter: Kok How Teh Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:8.0.17.0, 8.0.18 OS:Any
Assigned to: CPU Architecture:Any

[24 Sep 2019 8:46] Kok How Teh
Description:
.Net Core 3.0 EntityFrameworkCore 3.0 get this 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.

How to repeat:
Use .Net Core 3.0 and EntityFrameworkCore 3.0

Suggested fix:
Implement the missing API.
[24 Sep 2019 9:44] Kok How Teh
Notice the spelling error in the namespace, "Infraestructure" instead of "Infrastructure". Could that be the root cause?
[24 Sep 2019 10:06] Umesh Shastry
Hello Kok How Teh,

Thank you for the report.
Imho this is most likely duplicate of Bug #88322, please see Bug #88322.

regards,
Umesh
[24 Sep 2019 12:01] Rener Lemes
Not a duplicate bug. The problem is that MySql.Data.EntityFrameworkCore is not support .NET Core 3.0. Are you predicting when you will have a new version?
[24 Sep 2019 17:31] Thomas Mack
Did you even read the original report? That bug report you mentioned has nothing to do with this issue. The issue is exactly what Kok How Teh said - the EntityFramework is not compatible with .NET Core 3.0.
[25 Sep 2019 4:46] Umesh Shastry
Hello Rener, Thomas,

Thank you for your feedback.
Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead. May I request you to please provide exact repeatable test case to reproduce this issue at our end? If the data you need to attach is more than 3MB, you should create a compressed archive of the data and a README file that describes the data with a filename that includes the bug number (recommended filename: mysql-bug-data-96990.zip) and upload one to sftp.oracle.com. more details are in the "file" section of this report.

Thank you for your interest in MySQL.

regards,
Umesh
[25 Sep 2019 5:23] Kok How Teh
The "duplicate" bug happened in 8.0.9.0 and this bug happens in 8.0.17.0. Was that bug fixed? If "yes" and if the resolution is the "same" according to you, why wouldn't this be discovered and prevented from happening? How do you QA/regress your application?
[25 Sep 2019 6:06] Umesh Shastry
Thank you for the feedback.

regards,
Umesh
[25 Sep 2019 6:12] Umesh Shastry
Bug #97000 marked as duplicate of this one
[25 Sep 2019 11:40] Umesh Shastry
- VS 2019, C/NET 8.0.17, Microsoft.EntityFrameworkCore 3.0.0
- MySql.Data.MySqlClient .Net Core Class Library - 8.0.17
- MySql.Data.EntityFrameworkCore for Entity Framework - 8.0.17

- I'm no good on C/NET, just followed
https://dev.mysql.com/doc/connector-net/en/connector-net-entityframework-core-example.html
- Same test case as is in https://bugs.mysql.com/95533 with changes in User.cs

-
using MySql.Data.MySqlClient;
using MySql.Data.Types;
using System;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            using (AppContext db = new AppContext())
            {

                User user1 = new User { Name = "Tom", Age = 33 };
                User user2 = new User { Name = "Alice", Age = 26 };

                db.Users.Add(user1);
                db.Users.Add(user2);
                db.SaveChanges();
                Console.WriteLine("Saved all users");
            }
            Console.Read();
        }
    }
}
-
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.EntityFrameworkCore;

namespace ConsoleApp2
{
    public class AppContext : DbContext
    {
        public DbSet<User> Users { get; set; }

        public AppContext()
        {
            Database.EnsureDeleted();
            Database.EnsureCreated();
        }

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseMySQL("server=localhost; database=test; user=root; password=mysql123");
        }
    }
}
-
using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApp2
{
    public class User
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public int Age { get; set; }
        // public bool Status { get; set; };
        public System.Nullable<bool> Status { get; set; }
    }
}
---
Unhandled 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.
   at Microsoft.EntityFrameworkCore.MySQLDbContextOptionsExtensions.UseMySQL
   at ConsoleApp2.AppContext.OnConfiguring(DbContextOptionsBuilder optionsBuilder) in C:\Work\MySQLNet\source\ConsoleApp2\ConsoleApp2\AppContext.cs:line 20
   at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
   at Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<System.IServiceProvider>.get_Instance()
   at Microsoft.EntityFrameworkCore.Infrastructure.Internal.InfrastructureExtensions.GetService[TService](IInfrastructure`1 accessor)
   at Microsoft.EntityFrameworkCore.Infrastructure.AccessorExtensions.GetService[TService](IInfrastructure`1 accessor)
   at Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade.get_Dependencies()
   at Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade.EnsureDeleted()
   at ConsoleApp2.AppContext..ctor() in C:\Work\MySQLNet\source\ConsoleApp2\ConsoleApp2\AppContext.cs:line 14
   at ConsoleApp2.Program.Main(String[] args) in C:\Work\MySQLNet\source\ConsoleApp2\ConsoleApp2\Program.cs:line 11
[25 Sep 2019 12:36] Thomas Mack
I mean all you need to do is create a .NET Core 3.0 project and add Mysql.Data.EntityFrameworkCore to it and try to run it. You'll get the error. This really isn't hard to understand, it's simply not compatible with .NET Core 3.0 which came out a couple days ago.
[25 Sep 2019 12:47] Umesh Shastry
Thank you, Thomas.
I tried with a sample test case and was able to verify.

regards,
Umesh
[14 Oct 2019 18:34] Thomas Mack
So, is this ever going to be fixed?
[17 Oct 2019 21:16] Diego Bonura
I guess it is fixed now:

https://dev.mysql.com/doc/relnotes/connector-net/en/news-8-0-18.html
[18 Oct 2019 11:15] Rener Lemes
The problemn is not resolved with 8.0.18 version. The same message error continue
[18 Oct 2019 19:45] Bruno Conti Conti
The error still occurring in version 8.0.18
[21 Oct 2019 4:25] Umesh Shastry
Bug #97298 marked as duplicate of this one
[21 Oct 2019 12:06] Christian Benner
I really like it to mark things as "duplicate" #97298 ;-)
Could be better to solve all the Problems in a timely manner. 

Visual Studio Integration ist open since more than two years. Notifier has wron API Calls to search for Updates. .NET Connector isn't EF3 Ready.

What happend to that really good piece of Software and Tools since Oracle buy it?
Only one developer working on that? Don't know how to fix it? Other interests?
Big hint: Give it back to the former maintainers ...
[21 Oct 2019 12:43] Thomas Mack
I mean they spelled infrastructure wrong (MySql.Data.EntityFrameworkCore.Infraestructure), did you really expect this to get fixed in a timely matter with the proper testing? I just use https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql instead. it actually works and that dev can spell.
[17 Nov 2019 13:07] W B
Any update on this rather easy fix that STILL isn't fixed? 

What's the holdup here? If we're using .NET Core 3 and MySql.Data.EntityFrameworkCore, our projects won't function. 

Let's get this taken care of. It was reported 2 months ago!
[17 Nov 2019 21:39] Christian Benner
do you think that there's only one dev from Oracle which are working on that?
I don't believe so. So many Errors still not fixed (some more thane four years).
They should give the whole Project back to the community. They'll know better how to fix Problems and also very faster than the only and lonely developer on Oracle working on MySQL ;-)

Good look
[20 Nov 2019 1:26] Ivan Krivyakov
+1: Version 8.0.18, problem not fixed.

I don't think it has anything to do with the spelling of Infraestructure: the class with that named MySql.Data.EntityFrameworkCore.Infraestructure.MySQLOptionsExtension does exist. It has to do with the absence of the getter for Info property in that class.
[7 Dec 2019 22:26] Nick Randolph
Whilst we await a fix for this issue - If you don't have other requirements for EF 3.0 you can still use EF 2.1 with the current version of the connector in a .NET Core 3+ project. I haven't tested exhaustively but it does appear to work.
[15 Dec 2019 18:22] Non Intanon
I'm waiting for the fix as well..
[8 Jan 4:55] Peter Schonefeld
for a workaround install package Pomelo.EntityFrameworkCore.MySql and use optionsBuilder.UseMySql(connectionString) ... notice case difference
[14 Jan 19:01] Anatoly Sysoev
8.0.19 does not solve the issue. And I was not able to use ef2.1 with core3 projects due to IAsyncEnumerable multiple conflicting declarations
[27 Jan 4:16] Thomas Mack
I love how they keep updating but haven't fixed the issue even though they said they did. Oracle should give back MySQL so that real developers can properly develop it.
[17 Feb 21:46] Daniel Valdez
Posted by developer:
 
This fix will came along with the next Connector/NET release (8.0.20) and the support for EF Core 3.1.1.
[18 Feb 20:27] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Connector/NET 8.0.20 release, and here's the proposed changelog entry from the documentation team:

The get_info method was not included in any of the Entity Framework Core
versions (1.1, 2.0, and 2.1) that Connector/NET supported. Connector/NET
now supports EF Core 3.1.1 and implements the
MySql.Data.EntityFrameworkCore.Infraestructure.MySQLOptionsExtension.get_info
method.

Thank you for the bug report.
[20 Feb 17:36] Christian Benner
Would be nice to know WHEN....
[4 Mar 14:40] Aaron Yarborough
Hi,

Is there an ETA on when this fix is going to be released? We're running 8.0.19 w/ dotnetcore 3.1 and hitting this error.