Could not load type 'Microsoft.EntityFrameworkCore.Metadata.IRelationalEntityTypeAnnotations' not found using .net core 3.0 preview
See original GitHub issueDescribe the bug Exception thrown by Audit.Net library when saving changes using latest .net core 3.0 preview (3.0.100-preview6-012264).
To Reproduce Add Audit.Net to library target netcoreapp3.0. I tried with both approaches of deriving from AuditDbContext and without inheritance.
Libraries (specify the Audit.NET extensions being used including version): For example:
- Audit.EntityFramework 14.5.7
Additional context Stacktrace:
Unhandled Exception: System.TypeLoadException: Could not load type ‘Microsoft.EntityFrameworkCore.Metadata.IRelationalEntityTypeAnnotations’ from assembly ‘Microsoft.EntityFrameworkCore.Relational, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’. at Audit.EntityFramework.DbContextHelper.GetEntityName(DbContext dbContext, EntityEntry entry) at Audit.EntityFramework.DbContextHelper.CreateAuditEvent(IAuditDbContext context) at Audit.EntityFramework.DbContextHelper.SaveChangesAsync(IAuditDbContext context, Func`1 baseSaveChanges) at Audit.EntityFramework.AuditDbContext.SaveChangesAsync(CancellationToken cancellationToken)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
Now working. I hadn’t spotted the new version that arrived yesterday. Thank you!
Ian
Hi I have the same issue: Audit,EntityFramework,Core 15,2.3 Why does it reference EF 2.2.4.0?
or am I missing something?