I tried to scaffold a database like the example.
I have a Console project, .NET 6.0
Installed MySQL.EntityFrameworkCore 6.0.4
Installed Microsoft.EntitiFrameworkCore.Tools 6.0.4
When trying
Scaffold-DbContext "Server=localhost;Database=mydatabase;Uid=root;Pwd=root" MySql.EntityFrameworkCore -OutputDir tmp -f it gives an error. Tried different versions of .NET nothing liked to work.
The error:
Build started...
Build succeeded.
System.InvalidOperationException: Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger`1[Microsoft.EntityFrameworkCore.DbLoggerCategory+Scaffolding]' while attempting to activate 'MySql.EntityFrameworkCore.Scaffolding.Internal.MySQLDatabaseModelFactory'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteF
...
...
...
Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger`1[Microsoft.EntityFrameworkCore.DbLoggerCategory+Scaffolding]' while attempting to activate 'MySql.EntityFrameworkCore.Scaffolding.Internal.MySQLDatabaseModelFactory'.
I have a Console project, .NET 6.0
Installed MySQL.EntityFrameworkCore 6.0.4
Installed Microsoft.EntitiFrameworkCore.Tools 6.0.4
When trying
Scaffold-DbContext "Server=localhost;Database=mydatabase;Uid=root;Pwd=root" MySql.EntityFrameworkCore -OutputDir tmp -f it gives an error. Tried different versions of .NET nothing liked to work.
The error:
Build started...
Build succeeded.
System.InvalidOperationException: Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger`1[Microsoft.EntityFrameworkCore.DbLoggerCategory+Scaffolding]' while attempting to activate 'MySql.EntityFrameworkCore.Scaffolding.Internal.MySQLDatabaseModelFactory'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteF
...
...
...
Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger`1[Microsoft.EntityFrameworkCore.DbLoggerCategory+Scaffolding]' while attempting to activate 'MySql.EntityFrameworkCore.Scaffolding.Internal.MySQLDatabaseModelFactory'.