When trimming, queries fail because of missing System.Math #27097
Labels
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
regression
Servicing-approved
type-bug
Milestone
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
The text was updated successfully, but these errors were encountered: