Bug #107022 Scaffold-DbContext throws error when using Mysql.EntityFrameworkCore 6.0.0
Submitted: 14 Apr 2022 14:27 Modified: 21 Apr 2022 13:30
Reporter: Dysean Haire Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:8.0.28 OS:Windows (Windows 10)
Assigned to: CPU Architecture:x86
Tags: MySql.EntityFrameworkCore

[14 Apr 2022 14:27] Dysean Haire
Description:
When I use the NuGet Package for MySql.EntityFrameworkCore version 6.0.0 and try to run the Scaffold-DbContext command in the package manager console, it throws the following error:"Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger`1[Microsoft.EntityFrameworkCore.DbLoggerCategory+Scaffolding]' while attempting to activate 'MySql.EntityFrameworkCore.Scaffolding.Internal.MySQLDatabaseModelFactory'."

Environment:
MySQL Server 5.7.37
Connector/NET 8.0.28

How to repeat:

1) Install Microsoft.EntityFrameworkCore 6.0.4 NuGet package
2) Install Microsoft.EntityFrameworkCore.Tools 6.0.4 NuGet package
3) Install Mysql.EntityFrameworkCore 6.0.0 NuGet package
4) run scaffold-DbContext in package manager console
[21 Apr 2022 13:30] MySQL Verification Team
Hello,

Thank you for the bug report.
Imho this is duplicate of Bug #106592, please see Bug #106592.

Regards,
Ashwini Patil