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

Can not use EF core 3.1 in .net 6 #28163

Closed
ponyspeed888 opened this issue Jun 6, 2022 · 3 comments
Closed

Can not use EF core 3.1 in .net 6 #28163

ponyspeed888 opened this issue Jun 6, 2022 · 3 comments

Comments

@ponyspeed888
Copy link

Try to use EF Core 3.1 in a .net standard library. When using this library in .net 6 project I got this error :

System.TypeInitializationException
Message=The type initializer for 'Microsoft.EntityFrameworkCore.Query.QueryableMethods' threw an exception.

Expected : There should be no issue as .net standard 2.0 is supported by all .net core version and EF Core 3.1 target .net standard 2.0

@ajcvickers
Copy link
Contributor

This issue is lacking enough information for us to be able to fully understand what is happening. Please attach a small, runnable project or post a small, runnable code listing that reproduces what you are seeing so that we can investigate.

@ponyspeed888
Copy link
Author

PonyEFCore31Bug.zip
Please see attached solution, it works on .net 5, failed on .net 6, please see the readme.txt

thanks.

@ajcvickers
Copy link
Contributor

@ponyspeed888 This is a duplicate of #24002, which is fixed in 3.1.14. Your application is using 3.1.10, and so does not have this fix. It is important to always use the latest patch version of a release to get important fixes, including those that might impact security.

@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants