Skip to content

Make basic EF scenarios work under aggressive trimming #29092

Closed

Description

.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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    area-globalclosed-fixedThe issue has been fixed and is/will be included in the release indicated by the issue milestone.type-enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions