IDE中的设计视图用于Windows窗体的子类其他窗体在平台目标X64上被破坏 [英] Design view in the IDE for Windows Forms that subclass other forms is broken on platform target X64

查看:75
本文介绍了IDE中的设计视图用于Windows窗体的子类其他窗体在平台目标X64上被破坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是个老消息,因为我刚刚在VS2015中发现它并在VS2013中确认了它,但这对我来说是新的。我在论坛或网络上的所有搜索都没有显示这些特定信息。

This might be old news, since I just discovered it in VS2015 and confirmed it in VS2013, but it's new to me. None of my searches on the forum or on the web in general turned up this specific information.

对于为平台目标X64构建的任何Windows窗体程序集或应用程序,如果是另一个程序集(甚至是相同的程序集) 包含一个从X64程序集中的表单继承的表单,继承表单无法在IDE的表单设计视图中显示。
只要为平台目标X64构建包含基本表单的程序集,它就会失败。以下是错误消息的开头:

For any Windows Forms assembly or application built for platform target X64, if another assembly (or even the same assembly) contains a form that inherits from a form in the X64 assembly the inheriting form cannot be shown in the IDE's form design view. It fails whenever the assembly containing the base form is built for platform target X64. Here's the start of the error message:

"无法为此文件显示设计器,因为其中的所有类都无法设计......"

"The designer could not be shown for this file because none of the classes within it can be designed..."

但是,如果包含基本表单的程序集是为平台目标AnyCPU构建的,那么设计视图仍然有效。

However, design view still works if the assembly containing the base form is built for platform target AnyCPU.

这是一个众所周知的问题,还是表单继承所以不经常使用,没有人注意到?我之前发现它的原因是我们总是在我们的整个应用程序框架中使用AnyCPU,但是在几周前我们决定将所有内容改为X64因为我们所有的应用程序在Windows Server上运行,我们永远不需要在32位操作系统上运行任何这些东西。

Is this a well-known problem, or is form inheritance so infrequently used that no one notices? The reason I just found about it now is that we've always used AnyCPU for our entire application framework, but on the occasion of moving up to VS2015 a couple weeks ago we decided to change everything to X64 because all our apps run on Windows Server and we will never have a need to run any of this stuff on a 32-bit OS.

我知道,对于Microsoft,Windows Forms开发已成为排序一个红头发的继子。我似乎记得有几个VS2015发布之前,MS试图完全从VS中删除Windows Forms,但最终还是推翻了这个决定。
我确信大多数MS开发现在都面向可以在多种类型的设备而不是普通的旧桌面Windows上运行的应用程序,因此Windows Forms开发可能处于低级维护状态。

I know that, for Microsoft, Windows Forms development has become sort of a red-haired stepchild. I seem to remember that a couple VS2015 releases ago, MS tried to remove Windows Forms from VS altogether but ended up reversing that decision. I'm sure that the majority of MS development is now oriented towards apps that can run on multiple types of devices rather than plain old desktop Windows, so maybe Windows Forms development is in sort of a low-level maintenance state.

有什么想法?

推荐答案

> ;但是,如果包含基本表单的程序集是为平台目标AnyCPU构建的,那么设计视图仍然有效。

>However, design view still works if the assembly containing the base form is built for platform target AnyCPU.

那么x86呢?

是它可能只是VS IDE只是一个32位应用程序?

Is it perhaps just that the VS IDE is only a 32-bit application?

戴夫


这篇关于IDE中的设计视图用于Windows窗体的子类其他窗体在平台目标X64上被破坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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