Skip to content

System.Configuration: Fix a bug found in Imperiums: Greek Wars.

Connor McAdams requested to merge cmcadams/mono:system-config-fixes-v1 into wine-mono

These patches add a test for, and fix a bug that happens when parsing the configuration file for the game Imperiums: Greek Wars.

This used to work prior to importing referencesource's PropertyInformationCollection class, because Mono's version of this class did not have a check for ElementTagName being different from the name of the ConfigurationProperty that is having a PropertyInformation class created for it.

Mono's ConfigurationElement class uses the PropertyInformationCollection class to iterate through all the properties of a ConfigurationElement and set/retrieve their values. Referencesource's ConfigurationElement class uses ConfigurationPropertyCollection for this instead, which avoids this issue. To me, this seems like a bug in referencesource's PropertyInformationCollection class which is never encountered due to this difference. If an element has an accessible ConfigurationProperty class for a property, there should also be an accessible PropertyInformation class for the property.

Merge request reports

Loading