[关于控件调]试如何进行自已创建的控件调试?无法调试---内详
iGray 2005-04-08 01:56:57 问题一:
创建好了一个继承自UserControl类的控件(名为MyGroupControl已经编译成dll),现在的问题是,如何调试它?
//
1.我在项目中,添加了一个新的Windows Application项目(名为TestMyGroupControl),用于调试这个控件。
2.我先把控件MyGroupControl添加到Toolbox面板上,然后,拖一个MyGroupControl到TestMyGroupControl项目的Form1上。(我看了TestMyGroupControl已经自动添另了MyGroupControl的Reference)
3.问题就在这里了,无法调试,无法运行,弹出消息框,上面说:
A project with an Output Type of Class Library cannot be started directly.
In order to debug this project, go to the Debugging tab under Configuration Settings in Project Properties, and set the Start Action to Start External Program or Strart URL.
Alternatively, you can add a non-library project to this solution that uses a reference to this project and set it as the startup project.
//
Output Type of Class Library是什么意思,是指什么?
后面说的,可以添加一个 non-library project来解决这个问题,什么是non-library project?如何做?
//***************************************************
问题二:
如果,我是在一个项目中,创建了这个MyGroupControl控件,调试它当然没问题,但是,如何把MyGroupControl单独编译成dll文件,因为,项目中有多个自定义的控件,我想把它们全部编译成独立的dll。