命令行 编译C#.NET项目

命令行 编译C#.NET项目

 

@Rem @echo off

IF "%1"=="" (SET mode=Release) else (SET mode=%1)

cd ../
set ROOT_DIR=%cd%
set MSBUILD="C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"

IF %mode%==Release (
%MSBUILD% XXXX.sln /t:Rebuild /P:Configuration=Release /p:PlatformTarget=x86
@Rem ;Platform=x86
)

IF %mode%==Debug (
%MSBUILD% XXXX.sln /t:Rebuild /P:Configuration=Debug /p:PlatformTarget=x86
@Rem ;Platform=x86
)

if exist "Output\" RMDIR /s /q Output\

::ww-spc Explorer
mkdir Output\Explorer\
xcopy /y /c /E /k /x Client\bin\%mode%\*.* Output\Explorer\


::ww-spc Server
mkdir Output\Server\
xcopy /y /c /E /k /x Server\Host\bin\%mode%\*.* Output\Server\

 

cd build

goto END


echo incorrect prama
echo e.g.
echo build release
echo build debug
echo build

:END

posted on 2013-12-26 15:48  Henry_Wang  阅读(671)  评论(0编辑  收藏  举报

导航