warning NU1608: Detected package version outside of dependency constraint: Z.EntityFramework.Plus.EFCore 8.103.3 requires Microsoft.EntityFrameworkCore.Relational (>= 8.0.0 && < 9.0.0) but version Microsoft.EntityFrameworkCore.Relational 10.0.8 was resolved.
warning NU1608: Detected package version outside of dependency constraint: Z.EntityFramework.Extensions.EFCore 8.103.3 requires Microsoft.EntityFrameworkCore.Relational (>= 8.0.0 && < 9.0.0) but version Microsoft.EntityFrameworkCore.Relational 10.0.8 was resolved.
Hi we are mid upgrade to the latest ANZ version ,
Is this planned to be fixed or rectified as its causing a lot of noise in the build logs
1 Answer(s)
-
0
Hi @KieranIrl
You don't need to wait for Abp.EntityFrameworkCore.EFPlus to be updated for EF 10. The latest ASP.NET Zero has already removed that dependency (and the transitive Z.EntityFramework.Plus.EFCore package) from the solution. We replaced the batch operations it provided with EF Core's built-in ExecuteUpdate / ExecuteDelete APIs (available since EF Core 7), so nothing is lost.
Since you're mid-upgrade to the latest version, once you finish aligning your .csproj files with the latest template, the package reference, and therefore the NU1608 warnings, will disappear on their own.
If you still see the warnings after the upgrade, it means a reference to Abp.EntityFrameworkCore.EFPlus is still lingering in one of your own projects/customizations.
To resolve it:
Remove the
Abp.EntityFrameworkCore.EFPlusPackageReference from your .csproj. Replace anyBatchDeleteAsync/BatchUpdateAsync(from ABP) or.Update(...)/.Delete(...)(from Z.EntityFramework.Plus) calls with EF Core's nativeExecuteUpdateAsync/ExecuteDeleteAsync.For example:
// Before (Z.EntityFramework.Plus)
query.Update(x => new User { ShouldChangePasswordOnNextLogin = true });// After (native EF Core)query.ExecuteUpdate(setters => setters.SetProperty(b => b.ShouldChangePasswordOnNextLogin, true));Let us know if you run into any specific call that's hard to migrate and we'll be happy to help
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)