将用户定义的控件添加到表单时出错。 [英] Error when adding user-defined control to a form.

查看:111
本文介绍了将用户定义的控件添加到表单时出错。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用户定义的控件,该控件包含属性 IList 的属性 ElementList 。当我将控件添加到窗体中时,出现错误:

I have an user-defined control which includes a property ElementList of IList<WFParament> type. When I add my control into a form, I get the error:

"WorkFlowDesign.WFParament[]" can't be transfered into "WorkFlowDesign.WFParament[]"


推荐答案

您没有加载/引用了包含WorkFowDesign.WFParament类型的程序集的两个版本。如果使用用户控件的项目引用了程序集的一个版本,而用户定义的控件是针对另一个版本编译的,则可能会发生这种情况。在这种情况下,您将需要更新这两者之一,以便它们引用包含WorkflowDesign.WFParament的程序集的相同版本。

I would verify that you don't have two versions of the assembly containing the type WorkFowDesign.WFParament loaded/referenced. This could happen if your project where you are using the user control references one version of the assembly while the user defined control is compiled against a different version. If this is the case you will need to update one of the two so that they are referencing the same version of the assembly containing WorkflowDesign.WFParament.

这篇关于将用户定义的控件添加到表单时出错。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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