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)
Cloned EnityCloner and removed all Net6 and Net7 stuf from projectfiles.
Reference the EntityCloner.Microsoft.EntityFrameworkCore.dll directly in my projects instead of Nuget package.
Now it is working!
So there must be a reference or something which causes the use of nonexisting version of Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType.GetProperties() ???
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)