R
Roy Chastain
The following is all relevant to VS 8.0.50727.762 (SP.050727-7600)
I have .Net 3.0 installed along with the CTPs for WPF and WCF etc. I do NOT have Orcas installed.
I have created UserControl A
I have created UserControl B that has UserControl A on it
I have created UserControl C that has UserControl B on it.
I have a form F that has UserControl C on it.
User control B creates the following line of code in the designer.cs
this.A1.TicketConfiguration = ((KMS.Protocol.UTS.A)(resources.GetObject("A1.TicketConfiguration")));
This same line appears in UserControl C and in form F with the names changed as appropriate.
With these lines in place, the control or form will not display at design time. Instead I get the following where the control
should display.
<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><title></title><style>.ErrorStyle { font-family:
tahoma; font-size: 11 pt; text-align: left}.DetailsStyle { font-family: tahoma; font-size: 10pt; text-align: left;text-indent: 0;
word-spacing: 0; line-height: 100%; float: left; margin-top: 0; margin-bottom: 0}.StackStyleVisible { font-family: tahoma;
font-size: 10pt; text-align: left; margin-left: 20; text-indent: 0}.StackStyleHidden { display:none; font-family: tahoma;
font-size: 10pt; text-align: left; margin-left: 20; text-indent: 0}</style></head><body><DIV class="DetailsStyle"
width="100%"><table border="0" width="100%" id="table1" height="100%" cellspacing="0" cellpadding="0"><tr><td height="40"
bgcolor="#FF9999" width="8%" style="letter-spacing: 0" align="center"><img border="0" src="c:\temp\168639.tmp" width="35"
height="35" alt="ErrorImage" ></td><td height="40" bgcolor="#FF9999" width="91%" style="vertical-align: top; letter-spacing: 0"
align="left"><b><font size="2" face="Arial" fontsize="70%">One or more errors encountered while loading the designer. The errors
are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.</font><font size="2"
face="Arial"></font></b></td></tr><tr><td colspan="2" align="left" valign="top"><DIV id="div1" class="ErrorStyle"
width="100%"><span style="font-weight: 600"><br>Object of type 'KMS.Protocol.UTS.A' cannot be converted to type
'KMS.Protocol.UTS.A'. </span><br><a href="" id="details0">Hide</a><font color="#0000FF">  </font></DIV> </td>
</tr> <tr><td colspan="2" align="left" valign="top"><DIV id="div20" class="StackStyleVisible" width="100%"><br> at
System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)<br> at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager,
CodeAssignStatement statement)<br> at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager,
CodeStatement statement)</DIV></td></tr></table></div></body></html>
If I comment out the line in question, then the controls will display properly at design time. This line of code does not
adversly affect runtime. The code runs with or without it.
Questions
1) - What is the line of code actually trying to acomplish?
2) - What could be wrong.
3) - Is there something I can put on the control at design time that would prevent VS from generating this line.
I have .Net 3.0 installed along with the CTPs for WPF and WCF etc. I do NOT have Orcas installed.
I have created UserControl A
I have created UserControl B that has UserControl A on it
I have created UserControl C that has UserControl B on it.
I have a form F that has UserControl C on it.
User control B creates the following line of code in the designer.cs
this.A1.TicketConfiguration = ((KMS.Protocol.UTS.A)(resources.GetObject("A1.TicketConfiguration")));
This same line appears in UserControl C and in form F with the names changed as appropriate.
With these lines in place, the control or form will not display at design time. Instead I get the following where the control
should display.
<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><title></title><style>.ErrorStyle { font-family:
tahoma; font-size: 11 pt; text-align: left}.DetailsStyle { font-family: tahoma; font-size: 10pt; text-align: left;text-indent: 0;
word-spacing: 0; line-height: 100%; float: left; margin-top: 0; margin-bottom: 0}.StackStyleVisible { font-family: tahoma;
font-size: 10pt; text-align: left; margin-left: 20; text-indent: 0}.StackStyleHidden { display:none; font-family: tahoma;
font-size: 10pt; text-align: left; margin-left: 20; text-indent: 0}</style></head><body><DIV class="DetailsStyle"
width="100%"><table border="0" width="100%" id="table1" height="100%" cellspacing="0" cellpadding="0"><tr><td height="40"
bgcolor="#FF9999" width="8%" style="letter-spacing: 0" align="center"><img border="0" src="c:\temp\168639.tmp" width="35"
height="35" alt="ErrorImage" ></td><td height="40" bgcolor="#FF9999" width="91%" style="vertical-align: top; letter-spacing: 0"
align="left"><b><font size="2" face="Arial" fontsize="70%">One or more errors encountered while loading the designer. The errors
are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.</font><font size="2"
face="Arial"></font></b></td></tr><tr><td colspan="2" align="left" valign="top"><DIV id="div1" class="ErrorStyle"
width="100%"><span style="font-weight: 600"><br>Object of type 'KMS.Protocol.UTS.A' cannot be converted to type
'KMS.Protocol.UTS.A'. </span><br><a href="" id="details0">Hide</a><font color="#0000FF">  </font></DIV> </td>
</tr> <tr><td colspan="2" align="left" valign="top"><DIV id="div20" class="StackStyleVisible" width="100%"><br> at
System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)<br> at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager,
CodeAssignStatement statement)<br> at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager,
CodeStatement statement)</DIV></td></tr></table></div></body></html>
If I comment out the line in question, then the controls will display properly at design time. This line of code does not
adversly affect runtime. The code runs with or without it.
Questions
1) - What is the line of code actually trying to acomplish?
2) - What could be wrong.
3) - Is there something I can put on the control at design time that would prevent VS from generating this line.