Default Accessor Needed: Custom ConfigurationSection
Posted
by
Mark
on Stack Overflow
See other posts from Stack Overflow
or by Mark
Published on 2011-01-05T07:45:57Z
Indexed on
2011/01/05
8:53 UTC
Read the original article
Hit count: 313
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?
© Stack Overflow or respective owner