Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 8, 2025

This PR fixes the .NET 8.0 MySQL compatibility issue where applications would encounter a CoreTypeMappingParameters constructor error when using the MySQL persistence provider.

Problem

When using WorkflowCore with MySQL persistence in .NET 8.0 applications, users encountered this runtime error:

Method not found: 'Void CoreTypeMappingParameters..ctor(System.Type, Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer, System.Func`3<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.IEntityType,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator>)'

at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlBoolTypeMapping..ctor(String storeType, Nullable`1 dbType, Nullable`1 size)

The issue occurred because the MySQL persistence provider only targeted netstandard2.1 and net6.0, causing .NET 8.0 applications to use incompatible versions of Pomelo.EntityFrameworkCore.MySql.

Solution

  • Added net8.0 target framework to WorkflowCore.Persistence.MySQL.csproj
  • Added .NET 8.0 specific package references:
    • Pomelo.EntityFrameworkCore.MySql version 8.*
    • Microsoft.EntityFrameworkCore.Tools version 8.*
  • Updated the test project to include net8.0 target framework

This approach follows the same pattern used by other persistence providers (SQL Server and PostgreSQL) which already have .NET 8.0 support.

Testing

  • All 21 MySQL tests pass successfully on .NET 8.0
  • Backward compatibility maintained for existing target frameworks (netstandard2.1, net6.0)
  • Verified that the CoreTypeMappingParameters error no longer occurs in .NET 8.0 applications

Fixes #1378.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] .net8.0 mysql error Add .NET 8.0 support to MySQL persistence provider to fix CoreTypeMappingParameters error Sep 8, 2025
Copilot AI requested a review from danielgerlag September 8, 2025 17:08
@danielgerlag danielgerlag marked this pull request as ready for review September 17, 2025 14:36
@danielgerlag danielgerlag merged commit 75c440a into master Sep 17, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.net8.0 mysql error

2 participants