1.编写target文件
<Project ToolsVersion="14.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
DefaultTargets="Default">
<ItemGroup>
<SlnFiles Include=".xxx.sln"/>
<SlnFiles Include=".yyyzzz.sln"/>
</ItemGroup>
<Target Name="Default">
<MSBuild Projects="@(SlnFiles)"/>
</Target>
</Project>
2.编写bat文件,其中BuildAll.targets为上面文件名称。
echo off
cls
echo 开始编译
"%PROGRAMFILES(X86)%"MSBuild14.0Binmsbuild.exe BuildAll.targets
if "%1"=="nopause" goto END
pause
:END