Home > other >  Error while add migration to create database in Entity Framework 6, method not found CoreTypeMapping
Error while add migration to create database in Entity Framework 6, method not found CoreTypeMapping

Time:07-14

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 :

program.cs

I have no idea where to look, any suggestion?

CodePudding user response:

I found the solution for my problem based on the video in this article

enter image description here

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.

CodePudding user response:

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

  • Related