Skip to content

Publish with trimming doesn't remove Windows Forms if they are not used #16352

Open
@NN---

Description

@NN---

When I publish a project with UseWindowsForms true which has no dependency on System.Windows.Forms, e.g. simple HelloWorld application, the resulting directory still included Windows Forms and all their dependencies even if I add PublishTrimming and TrimMode link.
This adds about 60MB unnecessary overhead for my program.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions