命令行 编译C#.NET项目
@Rem @echo off
IF "%1"=="" (SET mode=Release) else (SET mode=%1)
cd ../
set ROOT_DIR=%cd%
set MSBUILD="C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.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 OutputExplorer
xcopy /y /c /E /k /x Clientin\%mode%*.* OutputExplorer
::ww-spc Server
mkdir OutputServer
xcopy /y /c /E /k /x ServerHostin\%mode%*.* OutputServer
cd build
goto END
echo incorrect prama
echo e.g.
echo build release
echo build debug
echo build
:END