无法在 C# 2010 中的表单上打开设计器
我通过 VB6 的 Artinsoft 转换在 C# 2010 中生成了一个解决方案。
当我在 C# 中打开新解决方案时,我右键单击表单,但没有“视图设计器”选项。我认为这是因为某些东西无法编译。可能是什么问题以及我应该如何解决它?
I have generated a solution in C# 2010 by way of the Artinsoft conversion from VB6.
When I open the new solution in C# I right-click on the forms but there is no "View Designer" option. I assume this is because something is failing to compile. What could be the problem and how should I fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我不认为这是因为编译失败,而是因为无法正确转换。即使该类未编译,如果它是一个表单,您应该能够查看和编辑表单部分。
I would not expect that from a failure to compile, but rather a failure to convert properly. Even if the class doesn't compile, if it's a form you shouldbe able to see and edit the form portion.
如果编译失败,应在错误列表中标记原因。更有可能的是,它只是将其创建为一个类(不继承自 Form)。
检查是否存在 MyForm.Designer.cs(其中您的表单名称为 MyForm),并检查 MyForm.cs 中的类声明是否继承自表单。
如果不是这种情况,则它尚未正确转换,因此您可能必须从表单继承,再次放置 UI 控件并将它们连接到任何事件
The reason should be marked in the error list if it's failing to compile. It's more likely that it's created it as just a class (that doesn't inherit from Form).
Check that there's a MyForm.Designer.cs (where your form name is MyForm) and also check that the declaration of the class in MyForm.cs inherits from form
If this isn't the case, it hasn't converted properly, so you may have to inherit from form, drop on the UI controls again and hook them up to any events
您是否尝试过以管理员身份运行 Visual Studio(提升权限)?
Have you tried running Visual Studio as Administrator (elevated rights)?
您可以尝试 Shift+F7 组合键吗?
Can you try Shift+F7 key combination?