dotnet/sdk#16865 adds a property (available in preview4) TrimmerDefaultAction which can be set to link to enable "LinkAll" behavior. Consider not suppressing trim analysis warnings in this case to warn users about possible issues.
This can be done by setting the following in some targets that are imported after the project file but before the .NET illink targets (so that it takes into account any user-set value for TrimmerDefaultAction):
<SuppressTrimAnalysisWarnings Condition="'$(SuppressTrimAnalysisWarnings)' == '' And '$(TrimmerDefaultAction)' != 'link'">true</SuppressTrimAnalysisWarnings>
and removing the unconditional setting from here:
https://github.com/xamarin/xamarin-macios/blob/5e18eae0cabeef04e10f3c80d5d68a9ec3e7dab4/dotnet/targets/Xamarin.Shared.Sdk.props#L12
@jonathanpeppers @marek-safar
See also #10405.
dotnet/sdk#16865 adds a property (available in preview4)
TrimmerDefaultActionwhich can be set tolinkto enable "LinkAll" behavior. Consider not suppressing trim analysis warnings in this case to warn users about possible issues.This can be done by setting the following in some targets that are imported after the project file but before the .NET illink targets (so that it takes into account any user-set value for
TrimmerDefaultAction):and removing the unconditional setting from here:
https://github.com/xamarin/xamarin-macios/blob/5e18eae0cabeef04e10f3c80d5d68a9ec3e7dab4/dotnet/targets/Xamarin.Shared.Sdk.props#L12
@jonathanpeppers @marek-safar
See also #10405.