runtime: System.Linq.Enumerable was broken in .NET 5 rc 1 wasm runtime

Describe the bug

When I update from Blazor 3.2 to .Net 5 RC 1 and then System.Linq.Enumerable was broken in wasm runtime.

It works well in debugging.

To Reproduce

Code: https://github.com/ant-design-blazor/ant-design-blazor/tree/master/components/table Online: https://ant-design-blazor.github.io/en-US/components/table

Exceptions (if any)

image

Further technical details

  • ASP.NET Core version .NET 5 rc 1
  • Include the output of dotnet --info
  • The IDE (VS / VS Code/ VS4Mac) you’re running on, and it’s version

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 17 (14 by maintainers)

Commits related to this issue

Most upvoted comments

For a 5.0 app, you can turn off trimming by configuring <PublishTrimmed>false</PublishTrimmed> in your project file.

Thanks @lewing , I tried, but it was still the exception.

Whoops, I gave the wrong instructions, try #42536 (comment) instead

It works now when disabled the trimming…

but we can cover that with a unit test

FWIW, we already have similar unit tests about correspondance between Queryable and Enumerable: https://github.com/dotnet/runtime/blob/e87d2470773e48991b8e1d965d49b3ef03b303fe/src/libraries/System.Linq.Queryable/tests/Queryable.cs#L102-L112