Skip to content

Trimmed apps cannot set System.Net.Security.UseManagedNtlm AppContext switch #123472

Description

@MichalStrehovsky

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:

<!-- Trim managed NTLM on Linux when it's not explicitly requested -->
<_UseManagedNtlm Condition="'$(_UseManagedNtlm)' == '' and $(RuntimeIdentifier.StartsWith('linux'))">false</_UseManagedNtlm>

I'm going to disable test that was enabled in #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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions