Skip to content

DataContractSerialization is not linker friendly #36154

Closed

Description

@eerhardt

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.

Activity

  1. added
    linkable-frameworkIssues associated with delivering a linker friendly framework
    on May 9, 2020
  2. removed
    untriagedNew issue has not been triaged by the area owner
    on Jun 25, 2020
  3. HongGit commented on Jun 25, 2020

    @HongGit
    Contributor

    The code is too intricate to be trimmed safely.

  4. eerhardt commented on Jun 26, 2020

    @eerhardt
    MemberAuthor

    We should annotate the API with [RequiresUnreferencedCode] attributes then, so someone who is trimming their app gets warnings when they call this code.

  5. HongGit commented on Jul 1, 2020

    @HongGit
    Contributor

    @eerhardt are you going to do this work? Can you please assign a milestone to this issue?

  6. added this to the 6.0.0 milestone on Jul 1, 2020
  7. eerhardt commented on Jul 1, 2020

    @eerhardt
    MemberAuthor

    @eerhardt are you going to do this work? Can you please assign a milestone to this issue?

    I'm not sure who will actually do the work. But there will be an effort to get the libraries annotated in 6.0, so I moved it to there.

  8. eerhardt commented on Apr 29, 2021

    @eerhardt
    MemberAuthor

    This has been addressed with #50619 and #51200. Closing.

  9. ghost locked as resolved and limited conversation to collaborators on May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions