Skip to content

Commit ba63153

Browse files
authored
[Xamarin.Android.Build.Tasks] $(HttpActivityPropagationSupport)=false in "Release" (#9933)
Context: d22f04e Context: dotnet/aspire#4684 Context: dotnet/maui#24365 Context: https://github.com/jfversluis/MauiAspire Commit d22f04e set the default value of the [`$(HttpActivityPropagationSupport)' MSBuild property][0] to false, which "removes code related to diagnostics support for System.Net.Http." This was done to reduce app size. .NET Aspire also uses System.Net.Http, and we'd like to System.Net.Http diagnostics support to be available by default in that environment; see also dotnet/aspire#4684 and dotnet/maui#24365. Update the `$(HttpActivityPropagationSupport)` MSBuild property to be false by default only in "Release" configuration builds, i.e. when `$(Optimize)`=true. [0]: https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options
1 parent 96db932 commit ba63153

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.DefaultProperties.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
<EnableUnsafeBinaryFormatterSerialization Condition="'$(EnableUnsafeBinaryFormatterSerialization)' == ''">false</EnableUnsafeBinaryFormatterSerialization>
116116
<EventSourceSupport Condition="'$(EventSourceSupport)' == ''">false</EventSourceSupport>
117117
<UseSystemResourceKeys Condition="'$(UseSystemResourceKeys)' == '' and '$(PublishTrimmed)' == 'true'">true</UseSystemResourceKeys>
118-
<HttpActivityPropagationSupport Condition="'$(HttpActivityPropagationSupport)' == ''">false</HttpActivityPropagationSupport>
118+
<HttpActivityPropagationSupport Condition="'$(HttpActivityPropagationSupport)' == '' and '$(Optimize)' == 'true'">false</HttpActivityPropagationSupport>
119119
<InvariantGlobalization Condition="'$(InvariantGlobalization)' == ''">false</InvariantGlobalization>
120120
<StartupHookSupport Condition="'$(StartupHookSupport)' == ''">false</StartupHookSupport>
121121
<UseSizeOptimizedLinq Condition="'$(UseSizeOptimizedLinq)' == ''">true</UseSizeOptimizedLinq>

0 commit comments

Comments
 (0)