HenkKin / EntityCloner.Microsoft.EntityFrameworkCore

Cloning entities using Microsoft.EntityFrameworkCore
20 stars 3 forks source link

Net7 needed in Net8 project? #12

Open btammenga opened 1 month ago

btammenga commented 1 month ago

We published our Net8 project to IIS. But are running into a problem with the EntityCloner. On our IIS Net6 and Net8 are installed. On our Dev machines with also Net7 present it's working fine.

The error is: System.MissingMethodException: Method not found: 'System.Collections.Generic.IEnumerable'1<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType.GetProperties()'. at EntityCloner.Microsoft.EntityFrameworkCore.DbContextExtensions.ResetEntityProperties(DbContext source, Object entity, String definingNavigationName, IReadOnlyEntityType definingEntityType, Object clonedEntity) at EntityCloner.Microsoft.EntityFrameworkCore.DbContextExtensions.InternalClone(DbContext source, Object entity, String definingNavigationName, IReadOnlyEntityType definingEntityType, Dictionary'2 references) at EntityCloner.Microsoft.EntityFrameworkCore.DbContextExtensions.CloneAsync[TEntity](DbContext source, Func'2 includeQuery, Object[] primaryKey)

btammenga commented 1 month ago
HenkKin commented 1 month ago

OK will investigate

HenkKin commented 1 month ago

I can not reproduce it

btammenga commented 1 month ago

I can not reproduce it

Thanks for your time. Perhaps removing the Net7 support and leaving only LTS Net6 and Net8, would help? Our solution is working for us.