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

Add IsTrimmable=False attribute to non-trimmable assemblies #9816

Closed
Redth opened this issue Aug 31, 2022 · 1 comment
Closed

Add IsTrimmable=False attribute to non-trimmable assemblies #9816

Redth opened this issue Aug 31, 2022 · 1 comment
Assignees
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) fixed-in-7.0.49 Look for this fix in 7.0.49 GA! t/app-size Application Size / Trimming (sub: perf)
Milestone

Comments

@Redth
Copy link
Member

Redth commented Aug 31, 2022

iOS:

Depending on the value of MTouchLink (and LinkMode for macOS projects), we set the corresponding TrimMode value(s) to get the same behavior. If a TrimMode value is set, that takes precedence over MTouchLink/LinkMode.

We should add [assembly: AssemblyMetadata ("IsTrimmable", "False")] for MAUI assemblies that don't support trimming.

Note that in .NET 7 the default (for non-Apple workloads, because we override the default) is to trim assemblies unless they have that attribute (the default in .NET 6 was to only trim assemblies that had the attribute set to "True"). This means that in .NET 7 your assemblies will get trimmed unless they set the attribute (again, this does not apply to Apple workloads, because we override the default, and our default has not changed).

@Redth Redth added the t/app-size Application Size / Trimming (sub: perf) label Aug 31, 2022
@Redth Redth added this to the 7.0-rc2 milestone Aug 31, 2022
@Redth Redth modified the milestones: 7.0-rc2, 7.0 Oct 4, 2022
@PureWeen
Copy link
Member

PureWeen commented Oct 5, 2022

related
#16861

mattleibow added a commit that referenced this issue Oct 12, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Nov 13, 2022
@samhouts samhouts added the fixed-in-7.0.49 Look for this fix in 7.0.49 GA! label Feb 16, 2023
@Eilon Eilon added the area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) label May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) fixed-in-7.0.49 Look for this fix in 7.0.49 GA! t/app-size Application Size / Trimming (sub: perf)
Projects
None yet
Development

No branches or pull requests

7 participants