Default Accessor Needed: Custom ConfigurationSection
- by Mark
I am totally confused by a simple Microsoft error message.
When I run XSD.exe against an assembly that contains a custom ConfigurationSection (which in turn utilizes a custom ConfigurationElement and a custom ConfigurationElementCollection, as well as several ConfigurationProperties), I get the following error message:
Error: There was an error processing 'Olbert.Entity.Utils.dll'.
There was an error reflecting type 'Olbert.Entity.DatabaseConnection'.
You must implement a default accessor on System.Configuration.ConfigurationLockCollection because it inherits from ICollection.
Yet the class in question has a default accessor:
public object this[int idx]
{
get { return null; }
set { }
}
I realize the above doesn't do anything, but I don't need to access the element's properties by index. I'm just trying to work around the error message.
So what's going on?