467,885 Members | 1,292 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,885 developers. It's quick & easy.

Design Mode Exception, Any ideas?

Hi,

I am using Visual C#.NET (2003 Env., Framework 1.1)

I wrote a custom control which seems to work just fine except that if I try
to add it to another form I get the following exception:

An exception occurred while trying to create an instance of
SPMInterface.CoarseApproachStepCalibrationCtl. The exception was "The type
serialized in the .resources file was not the same type that the .resources
file said it contained. Expected "SIUnitsLibrary.SIValue" but read
"SIUnitsLibrary.SIValue".".

SPMInterface.CoarseApproachStepCalibrationCtl is the control that it can't
add. SIUnitsLibrary.SIValue is a class that is used both in that control and
in the form I am trying to add the control to.

If I manually add the control to the form (in the code) and then run the
application, the control shows up and works just fine. But as soon as I go
back into design mode and try to view the form in the designer it gives me
this exception and (VERY ANNOYINGLY!) rips out the code that I wrote in to
load the control.

Any ideas what might be wrong? I've had the designer rip out custom
controls before, for example, if they try to reference something which isn't
initialized at design time and hence throws an exception. This is not the
case here, and I have no idea what this exception means or how to fix it.

Thanks,
Eric

Nov 16 '05 #1
  • viewed: 1005
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Eric Hudson | last post: by
1 post views Thread by Lance | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.