Steve, changes made outside the IDE can 'confuse' the designer. I would try
two things. I would comment out my initialization code and leave nothing but
InitializeComponent() in the form's constructor, and rebuild. If this did
not help, I would take a look at the .Designer.cs code and try isolating
code that may cause the problem by commenting out sections. This requires
understanding what the code does, so you know where to cut. Of course, I'd
backup the file before making any changes in the IDE-generated code. I get
Designer errors in my projects once in a while, often enough to get used to
it.
Michael
"steve" <s_******@yahoo.comwrote in message
news:4f********************************@4ax.com...
>
VS designer has started to complain about the following errors :
Object reference not set to an instance of an object.
Instances of this error (2)
and
Index was out of range. Must be non-negative and less than the size of the
collection. Parameter name: index
Instances of this error (12)
1. Hide Call Stack
at System.ComponentModel.ReflectPropertyDescriptor.Se tValue(Object
component, Object value)
at
System.ComponentModel.Design.Serialization.CodeDom SerializerBase.DeserializePropertyAssignStatement( IDesignerSerializationManager
manager, CodeAssignStatement statement, CodePropertyReferenceExpression
propertyReferenceEx, Boolean reportError)
at
System.ComponentModel.Design.Serialization.CodeDom SerializerBase.DeserializeAssignStatement(IDesigne rSerializationManager
manager, CodeAssignStatement statement)
at
System.ComponentModel.Design.Serialization.CodeDom SerializerBase.DeserializeStatement(IDesignerSeria lizationManager
manager,
CodeStatement statement)
It has been working fine for months. I haven't even changed the code in
this module. And, the code runs fine when I just run the
code.
Any idea how to get rid of this problem would be welcome. They don't even
bother to indicate what field there is a problem with or
where the problem happened in the code - at least as far as I can see.
Thanks,
Steve