常用CSC命令

本文介绍了如何使用C#编译器csc.exe来构建C#文件。通过几个具体的命令实例,如生成库文件和引用DLL文件,展示了基本的编译流程。此外,还提到了如何运行编译后的EXE文件及传递参数。

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/archive/2008/12/10/1351698.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值