AutoHistory icon indicating copy to clipboard operation
AutoHistory copied to clipboard

Exception using .net 6

Open beachwalker opened this issue 3 years ago • 12 comments

When trying to run it with .net 6 and ef core 6.0.1 this throws an exception during startup.

System.MissingMethodException: Method not found: 'System.Type Microsoft.EntityFrameworkCore.Metadata.ITypeBase.get_ClrType()'.
   at Microsoft.EntityFrameworkCore.DbContextExtensions.AutoHistory[TAutoHistory](EntityEntry entry, Func`1 createHistoryFactory)
   at Microsoft.EntityFrameworkCore.DbContextExtensions.EnsureAutoHistory[TAutoHistory](DbContext context, Func`1 createHistoryFactory)
   at Microsoft.EntityFrameworkCore.DbContextExtensions.EnsureAutoHistory(DbContext context)

beachwalker avatar Jan 27 '22 23:01 beachwalker

I cloned the current repo, included this in my project and it solved this problem for me so guessing the project just needs a new build pushed to nuget for Net 6. Is this something in the works?

lostatredrock avatar Feb 02 '22 16:02 lostatredrock

We get this exception since ef core 6 and .net 6: Method not found: 'System.String Microsoft.EntityFrameworkCore.RelationalEntityTypeExtensions.GetTableName(Microsoft.EntityFrameworkCore.Metadata.IEntityType)'.

NormanGiHu avatar Feb 09 '22 14:02 NormanGiHu

Do we know when the latest build will be pushed to nuget for .NET 6 ?

sauhardad avatar Apr 05 '22 14:04 sauhardad

maybe this weekend

rigofunc avatar Apr 06 '22 01:04 rigofunc

I'm still getting the error: System.MissingMethodException: Method not found: 'System.Type Microsoft.EntityFrameworkCore.Metadata.ITypeBase.get_ClrType()'. Using:

  • Microsoft.EntityFrameworkCore" Version="6.0.4"
  • Microsoft.EntityFrameworkCore.AutoHistory" Version="5.0.8"

GeorgeLeithead avatar Apr 21 '22 15:04 GeorgeLeithead

We get this exception since ef core 6 and .net 6: Method not found: 'System.String Microsoft.EntityFrameworkCore.RelationalEntityTypeExtensions.GetTableName(Microsoft.EntityFrameworkCore.Metadata.IEntityType)'.

I got this error, too, when I migrate from .Net 5 to .Net 6.

OS: Ubuntu 18.04;
DotNet SDK: 6.0.300;

LinQiaoPorco avatar Jun 02 '22 06:06 LinQiaoPorco

I'm still getting the error: System.MissingMethodException: Method not found: 'System.Type Microsoft.EntityFrameworkCore.Metadata.ITypeBase.get_ClrType()'. Using:

  • Microsoft.EntityFrameworkCore" Version="6.0.4"
  • Microsoft.EntityFrameworkCore.AutoHistory" Version="5.0.8"

Same with me. Any help would be appreciated.

Thanks,

NewGHUser4321 avatar Aug 03 '22 11:08 NewGHUser4321

if you download from nuget it will throw this exception , you can clone this repository,and relaase it.

hhwwrr110 avatar Aug 11 '22 08:08 hhwwrr110

We get this exception since ef core 6 and .net 6: Method not found: 'System.String Microsoft.EntityFrameworkCore.RelationalEntityTypeExtensions.GetTableName(Microsoft.EntityFrameworkCore.Metadata.IEntityType)'.

I got this error, too, when I migrate from .Net 5 to .Net 6.

OS: Ubuntu 18.04;
DotNet SDK: 6.0.300;

Add Microsoft.EntityFrameworkCore.Relational solves the problem for me, have no idea if it worked for you.

LinQiaoPorco avatar Aug 11 '22 09:08 LinQiaoPorco