I used nuget to add these to my project: Microsoft.EntityFrameworkCore.Design v 7.0.1 Pomelo.EntityFrameworkCore.MySql v 6.0.2
and scaffolding with: dotnet ef dbcontext scaffold Name=NorthwindDB Pomelo.EntityFrameworkCore.MySql --output-dir Models --context-dir Data --namespace Northwind.Models --context-namespace Northwind.Data --context NorthwindContext -f --no-onconfiguring
I end up with the following errors
Scaffolding fails with the following output:
C:\Northwind.MySQL\Northwind.MySQL\Northwind.MySQL.csproj : error NU1107: Version conflict detected for Microsoft.EntityFrameworkCore.Relational. Install/reference Microsoft.EntityFrameworkCore.Relational 7.0.1 directly to project Northwind.MySQL to resolve this issue.
C:\Northwind.MySQL\Northwind.MySQL\Northwind.MySQL.csproj : error NU1107: Northwind.MySQL -> Microsoft.EntityFrameworkCore.Design 7.0.1 -> Microsoft.EntityFrameworkCore.Relational (>= 7.0.1)
C:\Northwind.MySQL\Northwind.MySQL\Northwind.MySQL.csproj : error NU1107: Northwind.MySQL -> Pomelo.EntityFrameworkCore.MySql 6.0.2 -> Microsoft.EntityFrameworkCore.Relational (>= 6.0.7 && < 7.0.0).
Build FAILED.
C:\Northwind.MySQL\Northwind.MySQL\Northwind.MySQL.csproj : error NU1107: Version conflict detected for Microsoft.EntityFrameworkCore.Relational. Install/reference Microsoft.EntityFrameworkCore.Relational 7.0.1 directly to project Northwind.MySQL to resolve this issue.
C:\Northwind.MySQL\Northwind.MySQL\Northwind.MySQL.csproj : error NU1107: Northwind.MySQL -> Microsoft.EntityFrameworkCore.Design 7.0.1 -> Microsoft.EntityFrameworkCore.Relational (>= 7.0.1)
C:\Northwind.MySQL\Northwind.MySQL\Northwind.MySQL.csproj : error NU1107: Northwind.MySQL -> Pomelo.EntityFrameworkCore.MySql 6.0.2 -> Microsoft.EntityFrameworkCore.Relational (>= 6.0.7 && < 7.0.0).
0 Warning(s)
1 Error(s)
I tried adding a reference to the Microsoft.EntityFrameworkCore.Relational dll in my dependencies, but I got the same error.
I tried different versions of of the dependencies, I'm at my wits end. Has anyone successfully done this kind of scaffolding using the pomelo lib?