Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Error while loading the designer in VS 2005
 

Error while loading the designer in VS 2005

HI i am unable to see the design view of a winform app

suddenly i am seeing this error

My page contains, Richtextbox, datetime controls,buttons etc.

Any advice is appreciated.



<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:\Documents and Settings\ballala.ASIAPAC\Local Settings\Temp\205165.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>The variable 'mi' is either undeclared or was never assigned. </span><br><a href="" id="details0">Hide</a><font color="#0000FF">&nbsp;&nbsp;&nbsp;&nbsp</font><a href="" id="task0">Edit</a><font color="#0000FF"></font></span></DIV> </td> </tr> <tr><td colspan="2" align="left" valign="top"><DIV id="div20" class="StackStyleVisible" width="100%"><br> at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)<br> at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)<br> at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAttachEventStatement(IDesignerSerializationManager manager, CodeAttachEventStatement statement)<br> at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)<tr><td colspan="2" align="left" valign="top"><DIV id="div1" class="ErrorStyle" width="100%"><span style="font-weight: 600"><br>The variable 'cm' is either undeclared or was never assigned. </span><br><a href="" id="details1">Hide</a><font color="#0000FF">&nbsp;&nbsp;&nbsp;&nbsp</font><a href="" id="task1">Edit</a><font color="#0000FF"></font></span></DIV> </td> </tr> <tr><td colspan="2" align="left" valign="top"><DIV id="div21" class="StackStyleVisible" width="100%"><br> at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)<br> at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)<br> at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyReferenceExpression(IDesignerSerializationManager manager, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError)<br> at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)<br> at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)<br> at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)</DIV></td></tr></table></div></body></html>
Babu Rajendra Prasad - CSC, Chennai  Monday, April 13, 2009 10:35 AM

Hi Neo,

When form is opened in the designer, the code in the InitializeComponent method of the form is executed. If there's something wrong in the InitializeComponent method, the form can't be opened in the designer properly.

The error youshow says "The variable 'mi' is either undeclared or was never assigned." Please check the variable 'mi' in the InitializeComponent method of the form to see if it is never assigned. If variable 'mi' isn't used at all, just delete it. After you correct the source code, re-open the form to see if it can be opened properly.

Hope this helps.

Sincerely,
Linda Liu

Linda Liu  Wednesday, April 15, 2009 8:10 AM

Hi Neo,

When form is opened in the designer, the code in the InitializeComponent method of the form is executed. If there's something wrong in the InitializeComponent method, the form can't be opened in the designer properly.

The error youshow says "The variable 'mi' is either undeclared or was never assigned." Please check the variable 'mi' in the InitializeComponent method of the form to see if it is never assigned. If variable 'mi' isn't used at all, just delete it. After you correct the source code, re-open the form to see if it can be opened properly.

Hope this helps.

Sincerely,
Linda Liu

Linda Liu  Wednesday, April 15, 2009 8:10 AM

Hi Neo,

When form is opened in the designer, the code in the InitializeComponent method of the form is executed. If there's something wrong in the InitializeComponent method, the form can't be opened in the designer properly.

The error youshow says "The variable 'mi' is either undeclared or was never assigned." Please check the variable 'mi' in the InitializeComponent method of the form to see if it is never assigned. If variable 'mi' isn't used at all, just delete it. After you correct the source code, re-open the form to see if it can be opened properly.

Hope this helps.

Sincerely,
Linda Liu



Linda, I think Neo is experiencing the same problem as me; which is that the type of issue that he is really reporting is that, rather than a receiving the issue as an HTML representation, the error is displayed as unformated HTML. This seems to be related to IE8 as I was forced during the IE8 beta, to uninstall IE8 after an unknown build changed the behaviour of Visual Studio. These issues are hard enough to resolve normally, without the added challenge of the HTML not being rendered into a viewable page.

I thought I had left this issue behind me by rejecting IE8 in favor of google chrome, but I've been forced to readdress this issue, due to IE8 being deployed as my company standard.

So all that being said, is thisissue resolved in any way, I've searched the web and found numerous references to the issue, but no solution.

Thanks

Mark Stone

stoned99  Monday, June 01, 2009 11:26 PM
Has this problem been resolved yet? I'm not talking about the underlying designer error. I'm talking about the display of un-formatted HTML We, too, recently went from IE7 to IE8 and now all designer errors in VS2005 show un-formatted HTML instead of the error screen with the red bar.

TIA.


Steve614  Tuesday, August 25, 2009 3:25 PM
I have another thread with the exact same issue open, and the answer is no, it's just about impossible to get MS to even acknowledge a problem. The answer always targets the underlying designer error, not the fact the message is no longer readable.

My theory is it's to do with IE8 security and where the tmp file is created that's rendered into HTML. I tinkered a little with permissions, but due to time constraints took the easy way out and reverted back to IE7.


One last comment, Linda marked this thread as answered, which is why it drops off the face of the earth, but I don't think she really understood the issue, I had the same issue in my thread where a mod tried to mark the issues as answered, and I had to reject the moderators answer so that the thread remains somewhat visible, although completely ignored.

  • Edited bystoned99 Tuesday, August 25, 2009 3:53 PM
  • Edited bystoned99 Tuesday, August 25, 2009 3:43 PM
  • Edited bystoned99 Tuesday, August 25, 2009 3:42 PM
  •  
stoned99  Tuesday, August 25, 2009 3:41 PM
Thanks for the reply, Mark. Seems like the ultimate solution may be to uninstall IE8. Based on other things I've seen via Google, seems like it might be related to security settings, so I guess I"ll play around with those for a bit. I'll post back here with the results.

Steve
Steve614  Tuesday, August 25, 2009 4:16 PM

You can use google to search for other answers

Custom Search

More Threads

• TabOrder for multiple groupboxes and other container controls
• Repainting Controls
• how to create difirence theme for our application.
• Alternate colors for cells in a table in RichTextBox?
• Inheriting from a component and showing the result in the designer?
• Custom control derived from Control not responding to Click event
• AutoScaleMode Property does not exist
• How to create mutil columns with Datagridview (VB 2005)
• How do you implement the layout commands for IDesignerHost?
• Enable first item in ListBox