Skip to content
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

6.0.0-preview.3 stopped working with the release of .NET 6.0 RC1 yesterday #92

Closed
buvinghausen opened this issue Sep 15, 2021 · 18 comments

Comments

@buvinghausen
Copy link

buvinghausen commented Sep 15, 2021

It was working through preview 7 just fine.

Here is the StackTrace

System.TypeLoadException: Method 'GetServiceProviderHashCode' in type 'ExtensionInfo' from assembly 'EFCore.NamingConventions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7' does not have an implementation.
   at EFCore.NamingConventions.Internal.NamingConventionsOptionsExtension.get_Info()
   at Microsoft.EntityFrameworkCore.DbContextOptions.GetHashCode()
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd[TArg](TKey key, Func`3 valueFactory, TArg factoryArgument)
   at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.GetOrAdd(IDbContextOptions options, Boolean providerRequired)
   at Microsoft.EntityFrameworkCore.DbContext..ctor(DbContextOptions options)

Also reverting back to 5.x yields the same exception.

@buvinghausen
Copy link
Author

Just as a follow on I tried it with an rc1 CI build of 6.0.0-rc.1-ci.20210913T102916 to see if the issue was upstream in Npgsql.EntityFrameworkCore.PostgreSQL and I still get the same exception.

@ZvonimirMatic
Copy link
Contributor

EF Core changed the contract for the extensions: dotnet/efcore#26022

Maybe it would be a good idea to upgrade to RC1 version of EF Core?

@buvinghausen
Copy link
Author

@ZvonimirMatic thank you for the context. That was why I tried the CI build of Npgsql.EntityFrameworkCore.PostgreSQL is because it is compiled against the RC1 release of EFCore... Unfortunately it still breaks.

@buvinghausen
Copy link
Author

Link

@roji
Copy link
Member

roji commented Sep 15, 2021

Yeah, this is expected - I will be porting the extension to rc1 in the coming weeks...

@ZvonimirMatic
Copy link
Contributor

@roji From this PR: dotnet/efcore#26111 it seems to me that the only changes to be made are to make the method GetServiceProviderHashCode return long instead of int and to make method ShouldUseSameServiceProvider return true (hopefully I didn't oversimplify this). Do you want me to do those changes and create a PR?

@roji
Copy link
Member

roji commented Sep 22, 2021

@ZvonimirMatic sure! Hopefully no other changes are needed (as indicated by the OP above)...

@ZvonimirMatic
Copy link
Contributor

@roji I created the pull request: #93

A couple of other changes needed to be made. I also updated the version of extension packages, I hope that's all right. All the changes are listed in the PR.

@buvinghausen
Copy link
Author

@roji I just saw rc1 posted to Nuget. Is there any way we can get this package updated soon since @ZvonimirMatic has the PR ready?

@roji
Copy link
Member

roji commented Sep 24, 2021

@buvinghausen I'll be reviewing and merging #93 in the next few days - there's a lot going on at the moment. Thanks for your patience.

@buvinghausen
Copy link
Author

Thank you Shay

@thangchung
Copy link

We have got the same issue after upgraded to .NET v6.0.100-rc.1.21458.32, and we're looking forward to this merging too.

@roji
Copy link
Member

roji commented Sep 26, 2021

@buvinghausen note cd128bb with some minor fixup to this PR.

@roji
Copy link
Member

roji commented Sep 26, 2021

Release 6.0.0-rc.1, thanks @buvinghausen!

@roji roji closed this as completed Sep 26, 2021
@buvinghausen
Copy link
Author

Thanks @roji everything ran perfectly!

@roji
Copy link
Member

roji commented Sep 27, 2021

@buvinghausen great, thanks for confirming and for the PR!

@buvinghausen
Copy link
Author

buvinghausen commented Sep 27, 2021

@roji I get no credit for the PR that goes to our main man @ZvonimirMatic

@roji
Copy link
Member

roji commented Sep 28, 2021

Oops, sorry... Thanks @ZvonimirMatic !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants