winform打开设计界面出现Html代码,中间还有乱码。。求解!

code_ming 2011-05-15 09:35:01
今天打开DevExpress 10.2.8的winfrom的Demo,结果设计界面无法打开,出现html代码,还出现乱码,整个Demo能运行,贴断代码上来:
<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\Administrator\Local Settings\Temp\20727.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%">鍔犺浇璁捐鍣ㄦ椂閬囧埌涓€涓垨澶氫釜閿欒銆傝繖浜涢敊璇湪涓嬮潰鍒楀嚭銆備竴浜涢敊璇彲閫氳繃閲嶆柊鐢熸垚椤圭洰鏉ヤ慨澶嶏紝鑰屽彟涓€浜涢敊璇垯闇€瑕佹洿鏀逛唬鐮併€?/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>鏈皢瀵硅薄寮曠敤璁剧疆鍒板璞$殑瀹炰緥銆?</span><br><a href="" id="details0">闅愯棌</a><font color="#0000FF">    </font></DIV> </td> </tr> <tr><td colspan="2" align="left" valign="top"><DIV id="div20" class="StackStyleVisible" width="100%"><br> 鍦?Microsoft.VisualStudio.Design.Serialization.ResXGlobalObjectProvider.CreateGlobalObjects(Project project)<br> 鍦?Microsoft.VisualStudio.Design.Serialization.ResXGlobalObjectProvider.GetGlobalObjectsCore(Project project, Type baseType)<br> 鍦?Microsoft.VisualStudio.Shell.Design.GlobalObjectProvider.GetGlobalObjects(Project project, Type baseType)<br> 鍦?Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GetGlobalObjects(Type baseType)<br> 鍦?Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GetGlobalObjects()<br> 鍦?Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetTypeFromGlobalObjects(String name, Boolean throwOnError, Boolean ignoreCase)<br> 鍦?Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase)<br> 鍦?Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name)<br> 鍦?System.ComponentModel.TypeDescriptor.CreateDesigner(IComponent component, Type designerBaseType)<br> 鍦?System.ComponentModel.Design.DesignSurface.CreateDesigner(IComponent component, Boolean rootDesigner)<br> 鍦?Microsoft.VisualStudio.Design.VSDesignSurface.CreateDesigner(IComponent component, Boolean rootDesigner)<br> 鍦?System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)<br> 鍦?System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name)<br> 鍦?System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)<br> 鍦?System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)<br> 鍦?System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)<br> 鍦?System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)<br> 鍦?System.ComponentModel.Design.Serialization.ComponentCodeDomSerializer.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)<br> 鍦?System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)<br> 鍦?System.ComponentModel.Design.Serialization.CodeDomSerializer.DeserializeStatementToInstance(IDesignerSerializationManager manager, CodeStatement statement)<br> 鍦?System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)<br> 鍦?System.Windows.Forms.Design.ControlCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)<br> 鍦?System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(IDesignerSerializationManager manager, String name, CodeStatementCollection statements)</DIV></td></tr></table></div></body></html>
遇到此问题的人不少,我也没找到解决的办法,求高手解答!
...全文
467 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
bgaidu 2012-01-07
  • 打赏
  • 举报
回复
解决办法就是
InitializeComponent() 里面的所有类型引用 直接补全名称
如:
System.Windows.Forms.Button cmd_Add;

this.cmd_Add = new System.Windows.Forms.Button();
包括属性用到的 也全名称显示

之后编译下就正常
无情海域 2011-08-01
  • 打赏
  • 举报
回复
解决办法就是
InitializeComponent() 里面的所有类型引用 直接补全名称
如:
System.Windows.Forms.Button cmd_Add;

this.cmd_Add = new System.Windows.Forms.Button();
包括属性用到的 也全名称显示

之后编译下就正常了
xstrong 2011-05-27
  • 打赏
  • 举报
回复
新建一个窗体,把代码粘贴进去试试
肖恩 2011-05-16
  • 打赏
  • 举报
回复
据听说DevExpress 10.2需要framework版本3.5以上,飘过……
余山水 2011-05-16
  • 打赏
  • 举报
回复
关闭窗体,清理解决方案,重新生成,再次打开一般就好了
蝶恋花雨 2011-05-16
  • 打赏
  • 举报
回复
生成后关闭窗体在打开就好了
蝶恋花雨 2011-05-16
  • 打赏
  • 举报
回复
生成一下单独的这个出现乱码的解决方案即可。
sky_rv 2011-05-16
  • 打赏
  • 举报
回复
应该是控件的引用上面2005 没法识别吧,
「已注销」 2011-05-16
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 lovingshu 的回复:]
会不会是BinaryFormatter()中的那个序列化方法的作用呢?序列化后中文不能正常显示但是英文却没有问题,我见你这个症状有点像,如果真是的话用反序列化吧~
[/Quote]
用2005打开出现这样的问题,2010打开就没这样的问题,未知!
lovingshu 2011-05-15
  • 打赏
  • 举报
回复
会不会是BinaryFormatter()中的那个序列化方法的作用呢?序列化后中文不能正常显示但是英文却没有问题,我见你这个症状有点像,如果真是的话用反序列化吧~
爱然 2011-05-15
  • 打赏
  • 举报
回复
这种情况,应该是什么组件不能正常使用,提示这样的.
把以前用的的引用组件重新注册下
kid_wang 2011-05-15
  • 打赏
  • 举报
回复
我承认,我被这一大堆的代码,吓怕了。

110,561

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧