Code generation for property 'Collection' failed.

I am getting a very annoying message from VS2005 – It started happening (I think) after I installed SP1.

I have a UserControl that consists of other UserControls. My project compiles fine but when I try to change anything in the designer I get a message box that appears 10 or so times and appears to occur when attempting to save the UserControl class file.

Code generation for property 'Users' failed. Error was: 'Type 'System.Windows.Forms.CurrencyManager' in Assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.'

The property is on the top level UserControl that it is referring to is a generic IBindingList implementation and is marked as [Serializable()] and so is the type that it contains. This has never been a problem before and I really cant work out what is causing this.

Thanks



Answer this question

Code generation for property 'Collection' failed.

  • Code generation for property 'Collection' failed.