AYE89

coding & learning

导航

批处理-通过mono把c#编译成dll

Posted on 2017-07-27 15:32  AYE89  阅读(1126)  评论(0编辑  收藏  举报
::copyright@cjy
@echo off
::mcs.exe address
set addrMcs=D:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\4.5

::UnityEngine.dll address
set addrUEdll=D:\UnityEngine.dll

::source c# file address
set addrscript=D:\unity_proj\motion1\Assets\Scripts\
set FileName=TestLib.dll


cd /d %addrMcs%
echo %cd%
:begin
echo Begin C# ==> DLL...
mcs -r:%addrUEdll% -target:library %addrscript%TestLib.cs
copy %addrscript%%FileName% D:\%FileName%

@pause
goto begin