Set HttpActivityPropagationSupport=true for non-Release builds#9933
Set HttpActivityPropagationSupport=true for non-Release builds#9933
Conversation
dellis1972
left a comment
There was a problem hiding this comment.
I just wish there was a better way to detect release builds. So many users do not use the standard Debug / Release configurations :(
which is something I also mentioned in passing elsewhere. Should we be using …or just tie it to fast deployment (lol?)? I think I largely agree with the sentiment that we should continue to avoid |
|
To explicitly add: my current preference is to use |
|
Draft commit message: [Xamarin.Android.Build.Tasks] $(HttpActivityPropagationSupport)=false in "Release" (#9928)
Context: d22f04ea8edbcfa90f16257e60295667b0887414
Context: https://github.com/dotnet/aspire/issues/4684
Context: https://github.com/dotnet/maui/pull/24365
Context: https://github.com/jfversluis/MauiAspire
Commit d22f04ea 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.
[0]: https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options |
using |
There's this: dotnet/sdk#31918... it's been almost two years since it was filed. IMHO at this point we (the android/macios/maui teams) could just decide to do something, and hope the SDK follows suit at some point. |
Use `'$(Optimize)' == 'true'`.
|
@dellis1972 @jonpryor just for my understanding, what does Optimize mean? |
Is a standard MSBuild property for the C# compiler which optimizes the IL. |
#22430) We set `HttpActivityPropagationSupport=false` when `Optimize=true`, to match what Android does (dotnet/android#9933). Fixes #22429. --------- Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>
Fixes #9932