比方说有两个项目,DatePicker,VaildTextBox两个分开的控件项目,以前分别是datepicker.dll,vaildtextbox.dll,现在我想把这两个项目合在一起编译成叫Controls的dll

解决方案 »

  1.   

    csc.exe /target:library /out:bin\YourName.dll csFilePath1 csFilePath2 csFilePath3...
      

  2.   

    Sample Command Lines
    Compiles File.cs producing File.exe: 
    csc File.cs 
    Compiles File.cs producing File.dll: 
    csc /target:library File.cs
    Compiles File.cs and creates My.exe: 
    csc /out:My.exe File.cs
    Compiles all of the C# files in the current directory, with optimizations on and defines the DEBUG symbol. The output is File2.exe: 
    csc /define:DEBUG /optimize /out:File2.exe *.cs
    Compiles all of the C# files in the current directory producing a debug version of File2.dll. No logo and no warnings are displayed: 
    csc /target:library /out:File2.dll /warn:0 /nologo /debug *.cs
    Compiles all of the C# files in the current directory to Something.xyz (a DLL): 
    csc /target:library /out:Something.xyz *.cs/cscomp/html/vcgrfbuildingfromcommandline.htm
      

  3.   

    还是要把所有的源文件拷贝到一个项目中才能编译成一个dll