Skip to content
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

Make basic EF scenarios work under aggressive trimming #29092

Closed
roji opened this issue Sep 14, 2022 · 0 comments · Fixed by #29095
Closed

Make basic EF scenarios work under aggressive trimming #29092

roji opened this issue Sep 14, 2022 · 0 comments · Fixed by #29095
Labels
area-global closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@roji
Copy link
Member

roji commented Sep 14, 2022

.NET 7.0 is enabling aggressive trimming mode for console applications (but not for other workloads, e.g. ASP.NET). This makes all EF console applications break immediately when published as trimmed.

This issue is about ensuring minimal functionality of EF console apps with aggressive trimming. Some caveats:

  • Some specific patterns may be necessary in user code in order to ensure that certain user types/members in the model aren't trimmed away. We will document these caveats.
  • EF will by no means be fully trimming-compatible, and no guarantees are given to the correct working of user applications. This is a best-effort work item; full compatibility with trimming will be explored in future versions of EF.

/cc @DamianEdwards @davidfowl @vitek-karas

roji added a commit to roji/efcore that referenced this issue Sep 14, 2022
To make basic save/query scenarios work with aggressive trimming, as
long as user types are properly preserved.

Closes dotnet#29092
roji added a commit to roji/efcore that referenced this issue Sep 14, 2022
To make basic save/query scenarios work with aggressive trimming, as
long as user types are properly preserved.

Closes dotnet#29092
roji added a commit that referenced this issue Sep 15, 2022
To make basic save/query scenarios work with aggressive trimming, as
long as user types are properly preserved.

Closes #29092
@ajcvickers ajcvickers added closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. area-global labels Oct 4, 2022
@ajcvickers ajcvickers added this to the 7.0.0-rc2 milestone Oct 4, 2022
@ajcvickers ajcvickers modified the milestones: 7.0.0-rc2, 7.0.0 Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-global closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants