Skip to content

When trimming, queries fail because of missing System.Math #27097

@roji

Description

@roji

Since we use our GetRequiredRuntimeMethod wrapper method, the linker cannot see our dependency on on Math (e.g. in SqlServerMathTranslator); this is a regression from EF Core 5.0, where at least basic query usage does work with .NET SDK 6.0.

The proper fix for this in 7.0 is to stop using GetRequiredRuntimeMethod (tracked by #26288), but for 6.0 we can do a simpler, less risky change that would make the dependency known to the linker. Other scenarios may very well fail since EF Core 6.0 isn't trimming-ready.

Reported e.g. in npgsql/efcore.pg#2185

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions