-
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
.NET Native: LINQ query with anonymous types throw NullReferenceException #5119
Comments
Curious about what the failure looks like. |
Added example error and stack trace. |
Thanks. Failure isn't great. I hope this can be fixed in .NET Native. I didn't know that nominal types made LINQ interpretation faster. That is interesting. |
We are discussing this with the .NET Native team, hopefully they can do something to enable this for us. Leaving open so that we can track the scenario (and marking as blocked since the fix is external to us). |
I did not use anonymous types, but in the debug is very fast, less than half a second. In relese very slow, there are more than ten seconds. await db.Bibles.Where (m => m.Scripture.Contains (text)).ToListAsync(); |
@Ghbi this issue is specifically about a failure with anonymous types. You should be able to find other .NET Native issues that are performance related if you do some searching. If you aren't sure whether what you are seeing has already been reported please create a new issue and provide a repro. |
Verified that this is fixed in the prerelease builds of EF 2.0.1 and UWP 6.0.0 |
With UWP Tooling 1.3.1 (latest at time of writing), some queries that use anonymous types fail on .NET Native (aka Universal Windows Platform apps on "Release" mode).
Example query that fails:
Example error:
Workaround
Replace anonymous types with concrete types. Although a little cumbersome, this should fix this issue. It also improves the speed and functionality of .NET Native's LINQ interpretation.
The text was updated successfully, but these errors were encountered: