Trimmed apps cannot set System.Net.Security.UseManagedNtlm AppContext switch
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
We document this AppContext switch: https://learn.microsoft.com/en-us/dotnet/api/system.net.networkcredential?view=net-10.0
But then we hardcode a value at build time for anything that is trimmed, so it's impossible to actually set the AppContext switch directly: https://github.com/dotnet/runtime/blob/20078050f3314428d8ed376dc0085b35856b105a/src/tools/illink/src/ILLink.Tasks/build/Microsoft.NET.ILLink.targets#L59-L60
I'm going to disable test that was enabled in https://github.com/dotnet/runtime/pull/123055 on this issue for native AOT because the test is still using native NTLM once trimmed and it's segfaulting in native AOT outerloop runs.
Ref #90957 that had a lot of discussion.
Contributor guide
Assessment
This issue has not been assessed yet.