Reputation: 263
I'm trying to run add migration to create database on my local machine, in the last seconds I get this error:
Method not found: 'Void CoreTypeMappingParameters..ctor(System.Type, Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer, System.Func`3<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.IEntityType,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator>)'.
Here is my Program.cs
:
I have no idea where to look, any suggestion?
Upvotes: 14
Views: 20714
Reputation: 11
I also encountered the same issue, all your entityframeworkCore packages should have the same regardless of the version type. Now i installed all latest version now its working
Upvotes: 1
Reputation: 37
In my case in single project ASP.Net core .Net 6.0 I solved the issue by Installing Microsoft.EntityFrameworkCore version 6.0.14 instead of 7.0.3
Upvotes: 0
Reputation: 668
I found the solution for my problem based on the video in this article
the solution is to make all the packages have the same version as Palemo.EntityFrameworkCore.MySql = 6.0.1
.
This made it work and create the migration for Mysql.
Upvotes: 31
Reputation: 263
If anyone has faced the same error, in your solution if you have different projects, check if the Microsoft Core version and tools versions are the same, removed them all re-installed the packages, the error is gone
Upvotes: 5