Windows窗体设计被永久打破了某种形式 [英] Windows Forms designer is permanently broken for a certain form

查看:189
本文介绍了Windows窗体设计被永久打破了某种形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个后续窗体上的所有控件都看不见的,现在我知道多一点吧。

This is a follow-up to All controls on a form are invisible, now that I know a little more about it.

我有一个与Visual Studio 2010中它工作正常的Windows窗体设计直到这个星期一段时间形成了一定的形式。现在,当我做任何改变的形式和设计重新创建了.Designer.cs 文件,所有具有约束力的成员都设置为无,所有的 Controls.Add被通话将被删除。该控件仍是可见的设计师,但是当我运行该项目的控制都是不可见的(因为那里是没有Controls.Add被调用)。如果我关闭并重新打开设计,形式为空白。

I have a certain form that was created with the Windows Forms designer of Visual Studio 2010. It was working fine until some time this week. Now when I make any change to the form and the designer recreates the .designer.cs file, all binding members are set to "none", and all Controls.Add calls are removed. The controls still are visible in the designer, but then when I run the project the controls are all invisible (due to there being no Controls.Add calls). If I close and reopen the designer, the form is blank.

有没有错误,警告或消息,说明为什么设计者是个混蛋,我真的不希望有重新创建窗体上的每一个控制,但它看起来像我可能别无选择。

There are no errors, warnings or messages indicating why the designer is being a jerk, and I really don't want to have to recreate every single control on that form, but it's looking like I might have no choice.

推荐答案

事实证明,真正的根本原因是,即使设计师偏向.NET 4.0 .NET 3.5模式下进行编译研究。针对.NET 4.0编译的时候,但只要改变的.resx有提及2.0.0.0绘图组件,而不是4.0.0.0,设计师怪胎它工作正常。

It turns out that the real root cause is compiling in .NET 3.5 mode even though the designer is biased toward .NET 4.0. It works fine when compiling against .NET 4.0, but as soon as the .resx changes to have references to "2.0.0.0" drawing components instead of "4.0.0.0", the designer freaks out.

这篇关于Windows窗体设计被永久打破了某种形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆