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
We have the following code in System.Private.Xml:
runtime/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAttributes.cs
Lines 75 to 89 in eac699c
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
AppDomainSetupas "ignore" when serializing to XML.However,
AppDomainSetupis severally gutted on .NET Core and no longer contains those members. As such, theSystem.XmlIgnoreMemberAttributewas removed fromSystem.Private.CoreLib(dotnet/coreclr#10837), but this code remains in System.Private.Xml.We should just remove this property all together.
cc @krwq @agocke