Skip to content

The generated c# code for XElement type cannot compile #20445

Closed

Description

@huanwu

The generated code is different from desktop version and cannot compile.

Activity

  1. huanwu commented on May 1, 2017

    @huanwu
    ContributorAuthor

    This is because the code is generated based on corefx, where the default constructor for XElement is public. The generated code is like
    o.@MyElement = (global::System.Xml.Linq.XElement)ReadSerializable(( System.Xml.Serialization.IXmlSerializable)**new global::System.Xml.Linq.XElement());**

    However the default constructor doesn't exist in dotnet standard, so the compile will fail.

  2. huanwu commented on May 5, 2017

    @huanwu
    ContributorAuthor

    The issue was fixed with dotnet/corefx#19244

  3. transferred this issue fromdotnet/corefxon Jan 31, 2020
  4. added this to the 2.0.0 milestone on Jan 31, 2020
  5. ghost locked as resolved and limited conversation to collaborators on Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions