ControlDesigner 不存在的解决

来源:互联网 发布:python 列表转多层字典 编辑:程序博客网 时间:2024/04/30 11:46

 

在 c#2.0 中,如果自定义设计时的事件,就需要扩展 ControlDesigner,从 msdn 上拷了一个例子,结果报了下面的错误:
错误 1 命名空间“System.Windows.Forms.Design”中不存在类型或命名空间名称“ControlDesigner”(是缺少程序集引用吗?) 

用对象浏览器查了一下,这个类是存在的,但是编译一直不能通过,而且我的引用中 System.Windows.Forms 是存在,
后来网上找到了一下,这个类在程序集  System.Design 中,而不是在 System.Windows.Forms 中,要引用 System.Design.dll才可以

参考:http://topic.csdn.net/t/20050825/10/4230209.html

原创粉丝点击