Using EF Core 7 and EF Core 8 in the same project

49 Views Asked by At

We need to use Entity Framework Core 7 and Entity Framework Core 8 in the same project. That works pretty well, with an external alias, I may redirect the namespaces to what I need.

But there is one exception. At build time a EFCoreSqlServerHierarchyId.cs file is created (I don't know who do this) with the following code:

[assembly: Microsoft.EntityFrameworkCore.Design.DesignTimeServicesReferenceAttribute("Microsoft.EntityFrameworkCore.SqlServer.Design.Internal.SqlServerHierarchyIdDesignTimeServices, Microsoft.EntityFrameworkCore.SqlServer.HierarchyId", "Microsoft.EntityFrameworkCore.SqlServer")]

Is there any chance to avoid that or to redirect the namespace? Editing the file makes no sense because of the recreation.

0

There are 0 best solutions below