Binary Compatibility of UserControls

G

Guest

I've built a few base widgets that are placed in a sub UserControl. That sub UserControl is then placed on a parent UserControl. Sometimes when I change one of the base widgets, the sub UserControl is automatically removed from the parent UserControl by Visual Studio. I would guess this is a binary compatibility problem but am unsure how to prevent it - I don't want to have to repaste the sub onto the parent every time I change one of the base controls. Is there some type of attribute I can set to prevent this (There is no compatibility setting in the controls properties)?
 
G

Guest

I am not sure, but you might have to close the project that has the parent control and rebuild the base usercontrols and then reopen the project... Perhaps that would do it?
 
Y

Ying-Shen Yu[MSFT]

Hi Mark,

Thanks for posting in the community!

From your description, you problem is when you modified some widgets the
parent control was removed from the Form. If I misunderstood your problem
please feel free to reply this thread to let me know.

This type of problem probably caused by an internal exception was thrown in
the usercontrol when these widgets interacting with it, VSIDE caught this
exception and removed this user control from the designer.
Since it's a design-time issue, many factors might causes this problem. We
need first try narrowing down this issue.
1. set up the symbol server setting in VS.NET
<Using a Symbol Server>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/htm
l/vxtskusingasymbolserver.asp
2.You may follow this article to do some debugging with your usercontrol in
design-time.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/
html/designtimedebugging.asp
Besides the settings in the article you may also check the
"Debug->Exceptions" dialog, Select the "CLR Exceptions" and set "When the
Exception is thrown" to "break into the debugger". This will catch the
first-chance exception (before VS.NET IDE handle it) and let us know more
about what was happened.

3. You may take a look at the call stack, to see if you could find some
clue from it.

if you need further help on this issue, please post detail information
about this issue, with the call stack, besides please also provide some
background information about this issue, such as:
Are these widgets you mentioned all Winforms Controls provided by .NET
Framework? If not, you may try putting the .NET Framework controls only to
see if the problem is still occurred.

Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, "online" should be removed before
sending.
 
G

Guest

Thanks for the replies. Ying-Shen your explanation is quite helpful. The base widgets I was talking about are extended (by me) versions of the DataGrid, DataGridColumnStyle, and TextBox. Now that I know why a control can be automatically removed by Studio, I know were to look for the cause - errors in the base widgets / controls. Thanks.
 
Y

Ying-Shen Yu[MSFT]

Hi Mark,

Thanks for your reply!
I'm glad to hear my suggestion is helpful to you, if you need further help
on this issue, please feel free to update this thread.
Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, "online" should be removed before
sending.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top