The given key 'DevExpres......' was not present in the dictionary

Viewed 25

I use XAF DevExpress and I have some problems to create a EF Core Migration

I am trying to perform a migration with the Add-Migration InitialCreate command, and I always have the same problem, I have the following error:

"The given key 'DevExpress.Persistent.BaseImpl.EFCore.IEFCoreWeakReference DevExpress.Persistent.BaseImpl.EFCore.AuditTrail.IAuditDataItemPersistent.NewObject' was not present in the dictionary."

I've been upgrading all the NuGet packages and it's still the same. I can not in any way do the migration.

I also get another error that I can't figure out what it could be. I've only been programming for 3 months so if my question isn't quite right, excuse me in advance.

"An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: Could not load type 'DevExpress.ExpressApp.EFCore.IXafDbContextFactory`1' from assembly 'DevExpress.ExpressApp.EFCore.v22.1, Version=22.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a' because a covariant or contravariant type parameter was used illegally in an inherited interface."

Thanks :')

1 Answers

I finally know where the problem is. DevExpress has released the option to get started with XAF Net Core 6.0 but is currently out of support for another 3 months. The "assembly" also does not work correctly for NET Core 6.0 and if we go down to NET Core 5.0, these same "Assembly" do not work for 5.0, that is, caught from all sides.

Now try with NET Core 5.0 and installing older assemblies. I was able to do the migration successfully.

For NET Core 6.0 we we have to wait at least 3 months

Related