gpt4 book ai didi

c# - Visual Studio 对我来说已经崩溃了?

转载 作者:行者123 更新时间:2023-12-01 23:14:55 26 4
gpt4 key购买 nike

我有一个问题希望能够得到解决。我一直在 VS 2010 中从事一个项目 - 似乎事情崩溃的速度比我修复它们的速度还要快。我没有改变前几个月的编码或使用设计器的方式...这里有一些屏幕截图 - 也许有人可以帮助我弄清楚这里发生了什么?我知道这相当模糊 - 但我正在抓狂,也许其他人也曾在这艘船上!

这些是来自 TabControl 的,我的 ToolStrip 也丢失了一些东西!

救命! ——安德鲁

VS sucks 1 enter image description here

更新

上述问题已得到解决,并且我能够在有限的时间内使用设计器 - 但是在构建之后,我现在收到以下错误...我已删除 bin/obj 文件夹但无济于事。

To prevent possible data loss before loading the designer, the following errors must be resolved: 
Object does not match target type
at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.SecurityUtils.MethodInfoInvoke(MethodInfo method, Object target, Object[] args)
at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

那么现在我正在尝试解决问题的一半...

最佳答案

下面有时有助于捕获设计时错误。 Reference

1) Start a second instance of visual studio

2) go the the Tools menu, "Attach to process", select the 'devenv.exe' process, and click the 'attach' button.

3) In the Debug/Exceptions menu, enter image description here Turn on exception catching when first thrown (in the Debug->Exceptions menu).

4) Open the designer with the debugger attached.

5) The second visual studion will break on your error.

关于c# - Visual Studio 对我来说已经崩溃了?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7264598/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com