-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
SqlServerMathTranslator exception #26878
Comments
@seble-nigussie Please post your full |
I was running into the same issue on AKS. We are deploying self-contained applications with the
|
Tracked by #26288. |
However, there is a risk that the build-time analysis of the application can cause failures at run time, due to not being able to reliably analyze various problematic code patterns (largely centered on reflection use). To mitigate these problems, warnings are produced whenever the trimmer cannot fully analyze a code pattern. For information on what the trim warnings mean and how to resolve them, see Introduction to trim warnings. |
@project-one-7 yeah, we're well aware of that - I've been doing work on introducing the appropriate trimming annotations to the EF code base, to make things work as best as possible. Because of the way EF works, it's most likely going to be impossible to make all EF applications trimming-friendly, but it'll be possible to make the majority of them (using standard patterns) trimming-friendly. I'll update in #21894. |
Issue Transfer
This issue has been transferred from the Azure SDK for .NET repository, #25631.
Please be aware that @seble-nigussie is the author of the original issue and include them for any questions or replies.
Details
Library name and version
'Microsoft.EntityFrameworkCore.SqlServer.Query.Internal.SqlServerMathTranslator' threw an exception. Could not find method 'Round' on type 'System.Math'
Describe the bug
Hello,
I'm getting the following exception thrown after updating to net6.0. The thing is it doesnt throw the exception locally and works fine, but in azure app service it throws. I am using the same data both locally and for dev. So, the problem couldnt be caused by the data. Its throwing this when reading from database. All my ef packages are updated to 6.0. Please help I couldnt figure out what this could be related to.
The type initializer for 'Microsoft.EntityFrameworkCore.SqlServer.Query.Internal.SqlServerMathTranslator' threw an exception. Could not find method 'Round' on type 'System.Math'
Expected behavior
Should work on azure app service, like its working locally.
Actual behavior
Fails on azure app service
Reproduction Steps
I dont have one. Since its working locally.
Environment
No response
The text was updated successfully, but these errors were encountered: