VB.NET Designer错误:如何(正确)继承继承表单的表单?

VB.NET Designer错误:如何(正确)继承继承表单的表单?,第1张

概述我想制作一种类型的BaseDialog模板,但是当创建一个继承BaseDialog的最终对话框MyDialog1时,我得到错误,那么对话框无法在设计模式下显示. 以下是我得到的错误列表. at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationM 我想制作一种类型的BaseDialog模板,但是当创建一个继承BaseDialog的最终对话框MyDialog1时,我得到错误,那么对话框无法在设计模式下显示.
以下是我得到的错误列表.

at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.Ensuredocument(IDesignerSerializationManager manager)at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.Performload(IDesignerSerializationManager manager)at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.Performload(IDesignerSerializationManager serializationManager)at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)

并且:
警告1无法为此文件显示设计器,因为其中的任何类都无法设计.设计者检查了文件中的以下类:

MyDialog1 --- The base class '[mynamespace].BaseDialog' Could not be loaded.  Ensure the assembly has been referenced and that all projects have been built.

以下是我所制作的类的示例(与.designer文件,< Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _,dispose等一起用于这两个类).

Public Class BaseDialoginherits System.windows.Forms.Form'End ClassPublic Class MyDialog1inherits BaseDialog'End Class

有人能告诉我我做错了吗?

解决方法 已经解决了.抱歉!
http://support.microsoft.com/kb/967050

原因

The Form Designer requires a compiled assembly in order to display an inherited form. If the base form class is contained within an assembly that was compiled using the x64 or Itanium options,they cannot be opened by the Form Designer. This is because Visual Studio is a 32-bit process,and cannot execute code in a 64-bit (x64 or Itanium) module.

解析度

Make sure the base form(s) are defined in an assembly that is compiled using the “Anycpu” build option. This allows form classes defined within the assembly to be used in either a 32-bit process (such as Visual Studio),or in a 64-bit custom process.

总结

以上是内存溢出为你收集整理的VB.NET Designer错误:如何(正确)继承继承表单的表单?全部内容,希望文章能够帮你解决VB.NET Designer错误:如何(正确)继承继承表单的表单?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1209734.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-04
下一篇 2022-06-04

发表评论

登录后才能评论

评论列表(0条)

保存