See this comment:
|
<!-- Too much private reflection. Do not bother with trimming --> |
|
<ILLinkTrimAssembly>false</ILLinkTrimAssembly> |
This setting only applies to running the linker during the dotnet/runtime build. It doesn't affect when a user's application uses this library and is trimmed.
If there is too much private reflection for this assembly to be trimmed, it isn't going to work well when an application using it is trimmed. We should ensure DataContractSerialization can be used safely by linked applications.
See this comment:
runtime/src/libraries/System.Private.DataContractSerialization/src/System.Private.DataContractSerialization.csproj
Lines 10 to 11 in 890fab0
This setting only applies to running the linker during the
dotnet/runtimebuild. It doesn't affect when a user's application uses this library and is trimmed.If there is too much private reflection for this assembly to be trimmed, it isn't going to work well when an application using it is trimmed. We should ensure DataContractSerialization can be used safely by linked applications.