Since many resource strings in ComponentModel.DataAnnotations contain messages that will be shown to end-users, we generate the "default value" string into the SR code. When a trimmed app strips the system resources, these strings will be used instead of the resource keys.
Fix #42257
<PropertyGroup>
<TargetFrameworks>netstandard2.1</TargetFrameworks>
<Nullable>enable</Nullable>
+ <!--
+ Since many resource strings in this library are shown to an end-user,
+ always generate default resource string values which will be used when UseSystemResourceKeys is true in trimmed apps.
+ -->
+ <GenerateResxSourceIncludeDefaultValues>true</GenerateResxSourceIncludeDefaultValues>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\ComponentModel\DataAnnotations\AssociatedMetadataTypeTypeDescriptor.cs" />