将cs文件打包成dll文件

csc /target:library [/reference:*.dll] [/out:*.dll] *.cs


/target:library          目标为动态链接库
/reference:*.dll         cs文件中有引用此dll
/out:*.dll               生成的文件及位置

*.cs                     原cs文件目录

例:

csc /target:library /reference:d:\test\UnityEngine.dll /out:d:\test\Debugger.dll d:\test\Debugger.cs d:\test\PointerCheck.cs

 

Mac系统在终端输入:mcs -target:library [-reference:*.dll] [-out:*.dll] *.cs


/target:library          目标为动态链接库
/reference:*.dll         cs文件中有引用此dll
/out:*.dll               生成的文件及位置

*.cs                     原cs文件目录

例:

csc /target:library /reference:d:\test\UnityEngine.dll /out:d:\test\Debugger.dll d:\test\Debugger.cs d:\test\PointerCheck.cs

 

Mac系统在终端输入:mcs -target:library [-reference:*.dll] [-out:*.dll] *.cs

猜你喜欢

转载自yukimomo.iteye.com/blog/2283112
今日推荐