- 메모장에서 build.proj 파일을 만들어서 아래의 내용을 복사해서 붙여넣기 한후 저장
<Project xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputPath>.\output</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<Optimize>false</Optimize>
<DebugSymbols>true</DebugSymbols>
<OutputPath>$(OutputPath)\Debug</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<Optimize>true</Optimize>
<DebugSymbols>false</DebugSymbols>
<OutputPath>$(OutputPath)\Release</OutputPath>
</PropertyGroup>
<Target Name="Build">
<MSBuild Projects="BuildTest.sln" Targets="rebuild"> </MSBuild>
<Exec Command="revc.exe" />
<!--<MakeDir Directories= "$(OutputPath)" />-->
<!--<Copy SourceFiles="build.proj" DestinationFiles="$(OutputPath)\build.txt" />-->
</Target>
</Project>
사용방법
- MSBuild MyApp.sln /t:Rebuild /p:Configuration=Release
- MSBuild MyApp.vcproj /t:Rebuild /p:Configuration=Debug