Add IsTrimmable=False attribute to non-trimmable assemblies #9816
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
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).
The text was updated successfully, but these errors were encountered: