Could not load type 'Microsoft.EntityFrameworkCore.Query.Internal.ExpressionEqualityComparer' from assembly 'Microsoft.EntityFrameworkCore
See original GitHub issueFirstOrDefault throws linq2db.EntityFrameworkCore.dll: 'Could not load type ‘Microsoft.EntityFrameworkCore.Query.Internal.ExpressionEqualityComparer’ from assembly 'Microsoft.EntityFrameworkCore, Version=5.0.0.0,
Do I miss something?
LinqToDBForEFTools.Initialize();
using (var efContext = new AccountingContextEf())
{
efContext.Database.OpenConnection();
efContext.Database.Migrate();
efContext.Database.CloseConnection();
efContext.Database.EnsureCreated();
var linq2DbContext = efContext.CreateLinqToDbContext();
var first = linq2DbContext.GetTable<User>().FirstOrDefault();
}
Environment details
linq2db version: 3.1.6 Database Server: SQLite In Memory .NET Framework: 5.0.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
Could not load type 'Microsoft.EntityFrameworkCore.Query. ...
Though I am pretty late but after struggling with this error thought should post my bit too. In my case, a package MockQueryable....
Read more >Could not load file or assembly class library " ...
When I run the application, I receive the error: Could not load file or assembly class library "Microsoft.EntityFrameworkCore version = 6.0 ...
Read more >Could not load type 'Microsoft.EntityFrameworkCore. ...
Could not load type 'Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtensionWithDebugInfo' from assembly 'Microsoft.
Read more >Could not load type 'Microsoft.AspNetCore.Mvc. ...
As the error message said, in the Microsoft.AspNetCore.Mvc.ViewFeatures assembly, it doesn't have the Internal.ExpressionMetadataProvider class.
Read more >Could not load type 'Microsoft.AspNetCore.Mvc.Internal. ...
I am upgrading my current project from .NET Core 3.1 to .NET 6.0. After upgrade of project along with its dependencies, I am...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I will post a complete project this evening
Didn’t recognize that. Ok, that is the solution.