-
-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EFCore 6 support (Method not found exception) #485
Comments
Actually I have made test with EF 5 and nugets update, just haven't published the new version yet. |
Same issue here. Please consider fixing this before the EF Core 6 release, if possible. BulkExtensions is really useful, and we're trying to keep up with the EF Core 6 previews for some of the improved features/performance. |
I'll take a look after finishing migration to .Net 5. |
Lib is upgraded to v5.+ with support for .Net 5 for EF Core 5. And I've tested it with EF Core 6 prev.2 in Test project where it fails with this error. Also I even tried updating nugets, in the library project itself, to this prerelease version just for test but wasn't able to install nugets, returns error:
|
@borisdj you need the latest VS preview! |
It looks like at the time of EF Core 6 Preview 2, the In the latest code, the class has some methods back. The method is marked obsolete, and the recommendation is to use EF Core 6 now targets .NET 5 rather than .NET Standard, which is explained in this blog post. Perhaps the best option would be a multitargeting approach? |
Any news on EFCore 6 support yet? It's only a couple of months until it'll be fully released. :) |
Doubt I'll have the time to work on this while in preview. |
Same here, we are making ready for .NET 6 upgrade and this package is blocking. Appreciate the effort and we will wait patiently. |
@borisdj EF Core 60 is already RC1. I'm pretty sure - no API changes will be in the release. |
I'll take a look at it next week with RC2. |
Have managed to make v6 |
Very quick test - appears to work. Thanks for this!! |
.Net 6 fully released. |
It is broken on net 6.0.0 Still having Using ALL EF packages set to 6.0.0 while the library using it was built on 5.0.13. |
I'm using dotnet 6, EFCore 6, and bulk extensions, and it all works just fine. When you say "the library" was built on 5, which library? |
I created a NuGet package based on net 5.0.13 using EF core 5.0.12. I used the package from an net6.0 project. In the net6 project I forced the EF core version to 6.0.0. Then I receive the Method not found exception. I solved it now by adding a net6.0 target for my package based on ef core 6.0.0. When using that from the net6 project the error is not occuring. I checked al namespaces and type names. There are no differences that can explain the Method not found. One possible cause may be a difference in nullability. The linker may see different types due to differences in nullability. |
Not working for me in .NET 6.0 either - I get the same error. All EF packages are version 6.0.24. Edit: Managed to resolve this. Turns out the issue was a nuget package that I was using - despite the package dependencies in Visual Studio telling me the version of EF this particular package was using was 6.0.24, it was actually using EF 2, and an extension method only available in EF 2 (IModel.FindEntityType()). This package was one of my own, so I was able to open the code and investigate - would never have figured this out if I didn't have access to the source code. I upgraded the framework of the package from netcore2.2 to net6.0, upgraded EF from 2 to 6 and refactored the troublesome code by casting the instance of IModel to IReadOnlyModel, as is the equivalent extension method for .NET 6.0/7.0 (see here: https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.metadata.ireadonlymodel.findentitytype?view=efcore-7.0):
Installed the new version of the package into my solution and the error disappeared. |
Get the following exception with EFCore 6 preview 2. BulkExtensions works fine with EFCore 6 preview 1 (as far as I can see so far).
I know you haven't tested/updated for EFCore 5 yet, let alone 6, but just thought I'd ping this FYI. No urgency.
The text was updated successfully, but these errors were encountered: