-
Notifications
You must be signed in to change notification settings - Fork 538
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
Stop using undocumented attribute trimming #9060
Comments
I guess this was added in 60e983c, so it's been here since .NET 6. This means we shouldn't use any |
Fixes: dotnet#9060 This was introduced in 60e983c (.NET 6 timeframe). It is a "private" switch that is no longer recommended.
The only other undocumented one is |
It looks like a medium-sized app is about 77kb bigger and hello world android 20kb bigger. That seems reasonable if there is concern of something breaking from the setting. |
This looks to be implemented by I would suggest switching to the |
Context: dotnet#9060 (comment) Context: https://github.com/dotnet/sdk/blob/e18cfb7a09d74952d5e9c2448d31dee313e059bb/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets#L522-L525 In eb6397d, we introduced `$(_SystemDiagnosticsMetricsMeterIsSupported)` to avoid a startup time regression with `HttpClient`-related code. At the time, the public property `$(MetricsSupport)` had not been introduced yet in the .NET SDK. Let's use `$(MetricsSupport)` instead of the private `$(_SystemDiagnosticsMetricsMeterIsSupported)` property.
Context: #9060 (comment) Context: https://github.com/dotnet/sdk/blob/e18cfb7a09d74952d5e9c2448d31dee313e059bb/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets#L522-L525 In eb6397d, we introduced `$(_SystemDiagnosticsMetricsMeterIsSupported)` to avoid a startup time regression with `HttpClient`-related code. At the time, the public property `$(MetricsSupport)` had not been introduced yet in the .NET SDK. Let's use `$(MetricsSupport)` instead of the private `$(_SystemDiagnosticsMetricsMeterIsSupported)` property.
Android framework version
net9.0-android
Affected platform version
.NET 9
Description
Android should consider removing the
_AggressiveAttributeTrimming
setting, see dotnet/runtime#88805.Android targets are using the undocumented
_AggressiveAttributeTrimming
setting which cannot be statically validated with trim warnings. The use of this option was introduced in #6563 together with NullabilityInfoContextSupport which has been removed in dotnet/runtime#103970, so it's not clear how much size savings come from_AggressiveAttributeTrimming
on its own.Steps to Reproduce
n/a
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: