2017-06-17 23:12:18 +03:00
|
|
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
2015-09-30 03:10:41 +03:00
|
|
|
|
2017-06-24 21:10:44 +03:00
|
|
|
<Target Name="BuildAllProjects">
|
2015-09-30 03:10:41 +03:00
|
|
|
<PropertyGroup>
|
|
|
|
<DefaultBuildAllTarget Condition="'$(DefaultBuildAllTarget)'==''">$(MSBuildProjectDefaultTargets)</DefaultBuildAllTarget>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<!-- To Serialize we use msbuild's batching functionality '%' to force it to batch all similar projects with the same identity
|
|
|
|
however since the project names are unique it will essentially force each to run in its own batch -->
|
|
|
|
<MSBuild Targets="$(DefaultBuildAllTarget)"
|
|
|
|
Projects="@(Project)"
|
2016-04-06 07:28:29 +03:00
|
|
|
Condition="'$(SerializeProjects)'=='true' AND '%(Identity)' != ''"
|
|
|
|
Properties="DefaultBuildAllTarget=$(DefaultBuildAllTarget);BuildAllProjects=true"
|
2015-09-30 03:10:41 +03:00
|
|
|
ContinueOnError="ErrorAndContinue" />
|
|
|
|
|
|
|
|
<MSBuild Targets="$(DefaultBuildAllTarget)"
|
|
|
|
Projects="@(Project)"
|
|
|
|
Condition="'$(SerializeProjects)'!='true'"
|
|
|
|
Properties="DefaultBuildAllTarget=$(DefaultBuildAllTarget);BuildAllProjects=true"
|
|
|
|
BuildInParallel="true"
|
|
|
|
ContinueOnError="ErrorAndContinue" />
|
|
|
|
|
|
|
|
<!-- Given we ErrorAndContinue we need to propagate the error if the overall task failed -->
|
|
|
|
<Error Condition="'$(MSBuildLastTaskResult)'=='false'" />
|
|
|
|
</Target>
|
|
|
|
|
2017-06-24 21:10:44 +03:00
|
|
|
<Target Name="RestoreAllProjects">
|
2015-09-30 03:10:41 +03:00
|
|
|
<Message Importance="High" Text="Restoring project packages..." />
|
|
|
|
|
|
|
|
<PropertyGroup>
|
2017-06-24 21:10:44 +03:00
|
|
|
<DefaultRestoreAllTarget Condition="'$(DefaultRestoreAllTarget)'==''">Restore</DefaultRestoreAllTarget>
|
2015-09-30 03:10:41 +03:00
|
|
|
</PropertyGroup>
|
|
|
|
|
2017-07-03 20:16:52 +03:00
|
|
|
<!-- Forcing BuildInParallel=false. BuildInParallel=true clashes with nuget task parallel restore -->
|
2017-06-24 21:10:44 +03:00
|
|
|
<MSBuild Targets="$(DefaultRestoreAllTarget)"
|
2015-09-30 03:10:41 +03:00
|
|
|
Projects="@(Project)"
|
2017-07-03 20:16:52 +03:00
|
|
|
BuildInParallel="false"
|
2015-09-30 03:10:41 +03:00
|
|
|
ContinueOnError="ErrorAndContinue" />
|
|
|
|
|
|
|
|
<!-- Given we ErrorAndContinue we need to propagate the error if the overall task failed -->
|
|
|
|
<Error Condition="'$(MSBuildLastTaskResult)'=='false'" />
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<TraversalBuildDependsOn>
|
|
|
|
BuildAllProjects;
|
|
|
|
$(TraversalBuildDependsOn);
|
|
|
|
</TraversalBuildDependsOn>
|
|
|
|
|
2017-06-24 21:10:44 +03:00
|
|
|
<TraversalRestoreDependsOn>
|
|
|
|
RestoreAllProjects;
|
|
|
|
$(TraversalRestoreDependsOn)
|
|
|
|
</TraversalRestoreDependsOn>
|
2015-09-30 03:10:41 +03:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<Target Name="Build" DependsOnTargets="$(TraversalBuildDependsOn)" />
|
|
|
|
|
2017-06-24 21:10:44 +03:00
|
|
|
<Target Name="Restore" DependsOnTargets="$(TraversalRestoreDependsOn)" />
|
2015-09-30 03:10:41 +03:00
|
|
|
|
2016-12-20 04:05:17 +03:00
|
|
|
</Project>
|