常用CSC命令

Start->All Program ->Microsoft Visual Studio 2008->Visual Studio tools->Visual Studio 2008 Command Promp

Open the command promp ,then we can use csc to build c# files ,and  use vbc to build vb files.

here are some command i used to build the .cs files.

>csc.exe /target:library  Interface.cs

>csc.exe Server.cs /r:Interface.dll

>csc.exe Client.cs /r:Interface.dll

In those three commands, we first build interface.cs to a .dll file ,then we used it to build our other cs files. here we must memorize those two command:    /target:library     /r:***.dll

After we use csc.exe to build the .cs file ,there will create .exe file in your folder. You can run it by double-click the exe file ,or you can just input the exe file's name in command promp to run it .

like this :

>Server.exe

>Client

if there are more than one parameters in your exe file ,like main(string[] args),you can input the parameters with a split "space".Like follows:

>test.exe 1  d 3 4 3 a

This is my summerise about the use of csc .

原文地址:https://www.cnblogs.com/huige1004/p/1351698.html