create a new project and select web control library ....or simply run csc.execsc /t:library yourcontrol.cs

解决方案 »

  1.   

    然后建一个.bat文件来编译代码  你打开一个记事本键入以下代码(假设已存在的文件在c:\
    文件名为 controls)命名为Compile.bat
      set outdir=c:\controls\bin\%1.dll
      set assemblies=system.dll,System.Web.dll
      csc/t:library/out:%outdir% /r:%asseemblies% %1.cs
     需要编译这个目录下的空件时 只要切换到命令提示符 更改目录到 c:
      然后键入以下命令
        c:\controls>Compile 自定义空件的文件名
    我是调试成功