Skip to content

Remove XmlIgnoreMemberAttribute references #49761

@eerhardt

Description

@eerhardt

We have the following code in System.Private.Xml:

private static Type IgnoreAttribute
{
get
{
if (s_ignoreAttributeType == null)
{
s_ignoreAttributeType = typeof(object).Assembly.GetType("System.XmlIgnoreMemberAttribute");
if (s_ignoreAttributeType == null)
{
s_ignoreAttributeType = typeof(XmlIgnoreAttribute);
}
}
return s_ignoreAttributeType;
}
}

This is referencing a legacy .NET Framework internal attribute in mscorlib that no longer exists in System.Private.CoreLib:

https://referencesource.microsoft.com/#mscorlib/system/xmlignorememberattribute.cs,33ba544d60bd65ba,references

From my understanding of the .NET Framework code, this attribute existed so we could mark certain members of AppDomainSetup as "ignore" when serializing to XML.

However, AppDomainSetup is severally gutted on .NET Core and no longer contains those members. As such, the System.XmlIgnoreMemberAttribute was removed from System.Private.CoreLib (dotnet/coreclr#10837), but this code remains in System.Private.Xml.

We should just remove this property all together.

cc @krwq @agocke

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions