Skip to content

Commit

Permalink
[One .NET] UseSystemResourceKeys=true only when linking (#6186)
Browse files Browse the repository at this point in the history
Fixes: #6185
Context: dotnet/runtime#56990

We should *only* default `UseSystemResourceKeys` to `true` if the
linker is enabled, so users get nice exception messages while
debugging.

If a user desires, they could retain long exception messages in
release builds by setting the value in the `.csproj`:

    <UseSystemResourceKeys>false</UseSystemResourceKeys>
  • Loading branch information
jonathanpeppers committed Aug 16, 2021
1 parent b4c8d09 commit df9e04d
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -87,7 +87,7 @@
See: https://github.com/dotnet/sdk/blob/1f544a59270cecb2947e50a01f7056c685b4e319/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets#L389-L392
-->
<InvariantGlobalization Condition="'$(InvariantGlobalization)' != 'true'"></InvariantGlobalization>
<UseSystemResourceKeys Condition="'$(UseSystemResourceKeys)' == ''">true</UseSystemResourceKeys>
<UseSystemResourceKeys Condition="'$(UseSystemResourceKeys)' == '' and '$(PublishTrimmed)' == 'true'">true</UseSystemResourceKeys>
<HttpActivityPropagationSupport Condition="'$(HttpActivityPropagationSupport)' == ''">false</HttpActivityPropagationSupport>
<StartupHookSupport Condition="'$(StartupHookSupport)' == ''">false</StartupHookSupport>
<UseNativeHttpHandler Condition="'$(UseNativeHttpHandler)' == ''">true</UseNativeHttpHandler>
Expand Down

0 comments on commit df9e04d

Please sign in to comment.