csc /target:library /out:%output% %src%

csc_exe.bat

@if "%1"=="" (
@echo usage:%0 srcfilename [outputfilename] [no .ext !]
@goto end
)
@set src=%1.cs
@set output=%2.exe
@if "%2"=="" (
@set output=%1.exe
)

@echo off
@csc /target:exe /out:%output% %src%
:end

csc_dll.bat

@if "%1"=="" (
@echo usage:%0 srcfilename [outputfilename] [no .ext !]
@goto end
)
@set src=%1.cs
@set output=%2.dll
@if "%2"=="" (
@set output=%1.dll
)

@echo off
@csc /target:library /out:%output% %src%
:end

 

posted @ 2017-10-25 18:17  sky20080101  阅读(121)  评论(0编辑  收藏  举报