Uh oh!
There was an error while loading. Please reload this page.
[mobile] Add extra HttpClientHandler linker substitution - #64818
Conversation
The linker substitution for HttpClientHandler.IsNativeHandlerEnabled only worked when <UseNativeHttpHandler> in a project was set to false. Since the default for MAUI projects is true, this caused us to carry more assemblies than needed. Fixesdotnet#64361
ghost
commented
Feb 4, 2022
Tagging subscribers to this area: @dotnet/ncl Issue DetailsThe linker substitution for HttpClientHandler.IsNativeHandlerEnabled only worked when in a project was set to false. Since the default for MAUI projects is true, this caused us to carry more assemblies than needed. Fixes #64361
|
eerhardt
left a comment
There was a problem hiding this comment.
Any way we can add a test for this? Maybe adding a https://github.com/dotnet/runtime/tree/main/src/libraries/System.Net.Http/tests/TrimmingTests ?
You can set feature switches in the trimming test following this pattern:
Uh oh!
There was an error while loading. Please reload this page.
ghost
commented
Feb 4, 2022
Tagging subscribers to 'size-reduction': @eerhardt, @SamMonoRT, @marek-safar Issue DetailsThe linker substitution for HttpClientHandler.IsNativeHandlerEnabled only worked when in a project was set to false. Since the default for MAUI projects is true, this caused us to carry more assemblies than needed. Fixes #64361
|
…mobile.xml Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
ghost
commented
Feb 4, 2022
Tagging subscribers to 'linkable-framework': @eerhardt, @vitek-karas, @LakshanF, @sbomer, @joperezr Issue DetailsThe linker substitution for HttpClientHandler.IsNativeHandlerEnabled only worked when in a project was set to false. Since the default for MAUI projects is true, this caused us to carry more assemblies than needed. Fixes #64361
|
eerhardt
left a comment
There was a problem hiding this comment.
This LGTM. Thanks for getting this fixed! It should really help app size in Maui.
Rethinking the trimming test - it isn't currently possible to write the test I mention above because we don't run the trimming tests on android or ios. See #39274
steveisok
commented
Feb 5, 2022
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1800182990 |
The linker substitution for HttpClientHandler.IsNativeHandlerEnabled only worked when in a project was set to false. Since the default for MAUI projects is true, this caused us to carry more assemblies than needed.
Fixes#64361