【问题标题】:Could not find type... Please make sure that the assembly that contains this type is referenced找不到类型...请确保引用了包含此类型的程序集
【发布时间】:2013-04-02 07:11:12
【问题描述】:

我创建了一个具有以下签名的通用用户控件..

public partial class GridMastercontrol<TMainEntity, TChildEntity> : UserControl
where TMainEntity : class
where TChildEntity : class
{
// more code here
}

引用创建如下-

GridMastercontrol<STACS.ACASupp,STACS.ACALot> ctrl=
                 new GridMastercontrol<STACS.ACASupp,STACS.ACALot>();

该控件在运行时完美运行。但是,当我打开设计器时,没有显示设计,并且会弹出以下两个警告-

警告 1- 找不到类型“WindowsFormsControlLibrary1.GridMastercontrol”。请确保引用了包含此类型的程序集。如果此类型是您的开发项目的一部分,请确保已使用当前平台或任何 CPU 的设置成功构建项目。

警告 2- 变量“ctlMasterACA”要么未声明,要么从未赋值。

当我没有在其中实现泛型概念时,它在设计模式下运行良好。但现在,它没有。 :(

请帮帮我.. 在此先感谢:)

【问题讨论】:

标签: entity-framework c#-4.0 generics user-controls


【解决方案1】:
猜你喜欢
  • 1970-01-01
  • 2016-07-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-08-16
  • 2010-09-08
  • 2013-04-21
  • 2014-11-01
相关资源
最近更新 更多