[转载:http://www.cnblogs.com/zhuawang/archive/2007/04/07/704268.html]
把CS文件编译成dll文件
如何做才能够把cs文件编译成dll且自动放到虚拟目录的bin文件夹中呢?
开始-------程序-------Microsoft Visual Studio.NET 2005-------Visual Studio.NET工具,点击其中的“Visual Studio.NET2005命令提示”,就会进入Microsoft Visual Studio.NET 2005命令提示窗口,然后我们用dos命令(cd)进入要编译成dll的cs文件所在的目录,然后输入命令:
csc /out: bin\index.dll /t:library index.cs
但是如果这个cs文件引用了bin目录下的另外一个dll文件如comman.dll,则应该这样输入命令:
csc /out: bin\index.dll /r: bin\comman.dll /t:library index.cs
参考:
http://cache.baidu.com/c?word=%B6%E0%B8%F6%3Bcs%3B%CE%C4%BC%FE%2C%B1%E0%D2%EB%3B%D2%BB%B8%F6%3Bdll&url=http%3A//blog%2Ecsdn%2Enet/tongdoudpj/archive/2007/08/15/1745509%2Easpx&p=8b2a960f9d8511a052acdf6857&user=baidu

浙公网安备 33010602011771号