Problem
Pomelo.EntityFrameworkCore.MySql 8.0.3 pins an exact dependency on Microsoft.EntityFrameworkCore.Relational 8.0.13. When consumers also reference
Microsoft.EntityFrameworkCore.Design (required for dotnet ef dbcontext scaffold), NuGet resolves Design to the latest 8.0.x patch (currently 8.0.25), creating an
unresolvable version conflict:
warning MSB3277: Found conflicts between different versions of
"Microsoft.EntityFrameworkCore.Relational" that could not be resolved.
There was a conflict between
"Microsoft.EntityFrameworkCore.Relational, Version=8.0.13.0" and
"Microsoft.EntityFrameworkCore.Relational, Version=8.0.25.0".
The only workaround is for consumers to manually pin all EF Core packages down to 8.0.13, losing 12+ months of Microsoft security and bug fix patches.
Proposed fix
Replace the exact version pin:
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.13" />
With a range:
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="[8.0.13, 9.0.0)" />
This allows NuGet to unify on any 8.0.x patch >= 8.0.13 while still protecting against a major version break. The same approach should apply to all transitive EF
Core dependencies (Abstractions, Analyzers, etc.).
Why this is safe
Microsoft's 8.0.x patch releases are backward-compatible by SemVer contract — they contain security fixes and bug fixes, not breaking API changes. Pinning to an
exact patch version provides no additional safety guarantee over a >= range, but does force consumers into dependency conflicts when any other package in their graph
references a newer patch.
Impact
Any project that uses both Pomelo 8.0.3 and Microsoft.EntityFrameworkCore.Design >= 8.0.14 hits this conflict. Since 8.0.3 shipped in February 2024 and no newer
8.0.x release has been published, the gap grows with every monthly Microsoft patch.
Environment
- Pomelo.EntityFrameworkCore.MySql: 8.0.3
- Microsoft.EntityFrameworkCore.Design: 8.0.25
- Target framework: net8.0
- dotnet-ef tool: 10.0.5
Problem
Pomelo.EntityFrameworkCore.MySql 8.0.3 pins an exact dependency on
Microsoft.EntityFrameworkCore.Relational8.0.13. When consumers also referenceMicrosoft.EntityFrameworkCore.Design(required fordotnet ef dbcontext scaffold), NuGet resolves Design to the latest 8.0.x patch (currently 8.0.25), creating anunresolvable version conflict:
warning MSB3277: Found conflicts between different versions of
"Microsoft.EntityFrameworkCore.Relational" that could not be resolved.
There was a conflict between
"Microsoft.EntityFrameworkCore.Relational, Version=8.0.13.0" and
"Microsoft.EntityFrameworkCore.Relational, Version=8.0.25.0".
The only workaround is for consumers to manually pin all EF Core packages down to 8.0.13, losing 12+ months of Microsoft security and bug fix patches.
Proposed fix
Replace the exact version pin: