Bug in DesignMode

Aug 5, 2006 at 12:21 PM
step 1. Add a MapImage control to a new form in vs2005.
step 2. close the form designer.
step 3. open the form in designer,it show some error ....

-------------------------------


Object of type 'SharpMap.Geometries.Point' cannot be converted to type 'SharpMap.Geometries.Point'.
Hide

at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

Object of type 'System.Collections.Generic.List`1SharpMap.Layers.ILayer' cannot be converted to type 'System.Collections.Generic.List`1SharpMap.Layers.ILayer'.
Hide

at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

Object of type 'SharpMap.Map' cannot be converted to type 'SharpMap.Map'.
Hide

at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)
Sep 4, 2006 at 5:29 AM
I have the same error.
Has anyone solved this problem?
Feb 11, 2007 at 8:09 PM
I am also having this problem.

I have tried with C# Express, C# Express SP1, and VS2005 Professional, they all seem to lead to this problem.

It seems to happen to me after a while of working on the same form.. I've found that if i create a completely new Windows Form it will load okay in that one for a while and then after about an hour or two of working fine it starts throwing that error.

If anyone knows of a workaround, i'd love to hear about it. I imagine I programmatically add the control to my form.

Notes about Configuration:
I have SharpMap and SharpMap.UI source code as projects in my solution.
I have checked out the project through SVN.
WinXP SP2 for all PCs.

Thanks,
Blake Robertson



Feb 11, 2007 at 8:10 PM
Edited Feb 11, 2007 at 8:11 PM
I also wanted to point out that i have experienced this on two different machines.
Developer
Feb 12, 2007 at 12:23 AM
This discussion has been copied to Work Item 8157. You may wish to continue further discussion there.
Feb 13, 2007 at 12:38 AM
I was unable to find Work Item 8157. I assumed this would be under the issue tracker. Perhaps you could point me in the right direction?
Developer
Feb 13, 2007 at 2:31 AM
Work Item 8157: Exception trying to deserialize MapImage::Map property in design mode

Resolved (I hope for good) with changeset 18222.

Best regards,
Ricardo Stuven.
Developer
Feb 13, 2007 at 3:00 AM
Edited Feb 13, 2007 at 3:01 AM
OFF-TOPIC: Please, everybody, vote for this CodePlex feature request to avoid the usual annoyance with copied work items.
Coordinator
Feb 20, 2007 at 11:49 PM
Thanks Ricardo!