使用MSBuild编译vs多个解决方案

1.编写target文件

<Project ToolsVersion="14.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
DefaultTargets="Default">

<ItemGroup>
<SlnFiles Include=".\xxx.sln"/>
<SlnFiles Include=".\yyy\zzz.sln"/>
</ItemGroup>

<Target Name="Default">
<MSBuild Projects="@(SlnFiles)"/>
</Target>

</Project>

2.编写bat文件,其中BuildAll.targets为上面文件名称。

echo off
cls
echo 开始编译
"%PROGRAMFILES(X86)%"\MSBuild\14.0\Bin\msbuild.exe BuildAll.targets

if "%1"=="nopause" goto END
pause

:END

猜你喜欢

转载自www.cnblogs.com/guanglin/p/12502325.html
今日推荐