This project has moved. For the latest updates, please go here.

The Item Type of this collection does not have a key property.

Mar 2, 2011 at 2:48 PM

I am trying to create a very simple config section with a single collection.

I following the documentation, creating a Foobars configuration element collection, and a Foobar configuration element.  But I get the error:

 The Item Type of this collection does not have a key property.

When I double click it, it selects both my collection and focuses on the property window.  I don't know where the problem is.

Since I'm just following the documentation, I'd think everyone would have this problem?  Is anyone else having issues like this?

I've tried a previous version, and a new separate solution, but I can't seem to make any progress.

Any help?

Mar 3, 2011 at 12:52 PM

Found my problem.  It seems very obvious now.  The "Key" attribute in the configuration element has to have IsKey = true.

The error message "The Item Type of this collection does not have a key property." makes sense.