diff options
author | Eric St. John <ericstj@microsoft.com> | 2017-02-15 03:32:08 +0300 |
---|---|---|
committer | Eric St. John <ericstj@microsoft.com> | 2017-02-16 23:18:19 +0300 |
commit | c0f0fdd87135f9fcca0d4026819d8c388c455967 (patch) | |
tree | 1ac08e838a10feae40aa5054530a92fb7044cb9f /buildvertical.targets | |
parent | e9febb51ab26da51c28797a831e89918031fc8ec (diff) |
Enable package build
This turns the package build back on and fixes all packages so that
they build.
There is still work to do to fix dependencies.
Diffstat (limited to 'buildvertical.targets')
-rw-r--r-- | buildvertical.targets | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/buildvertical.targets b/buildvertical.targets index 891061899d..f69aa0b815 100644 --- a/buildvertical.targets +++ b/buildvertical.targets @@ -38,6 +38,32 @@ </ItemGroup> </Target> + <Target Name="ExpandAllBuildConfigurationsForPkgProj" + BeforeTargets="ExpandProjectReferences" + Condition="'$(MSBuildProjectExtension)' == '.pkgproj'"> + <MSBuild Targets="GetPackageConfigurations" + Projects="@(_NonPkgProjProjectReference)"> + <Output TaskParameter="TargetOutputs" + ItemName="_NonPkgProjProjectReferenceBuildConfigurations" /> + </MSBuild> + + <ItemGroup> + <!-- assign configuration as a seperate step to prevent batching during the transform which can reorder the list. + order or projects matters here since this applies to traversal projects which build projects serially. --> + <_NonPkgProjProjectReferenceBuildConfigurations> + <AdditionalProperties>Configuration=%(Identity);%(_NonPkgProjProjectReferenceBuildConfigurations.AdditionalProperties)</AdditionalProperties> + </_NonPkgProjProjectReferenceBuildConfigurations> + + <!-- transform back to project --> + <_NonPkgProjProjectReferenceWitnConfiguration Include="@(_NonPkgProjProjectReferenceBuildConfigurations->'%(OriginalItemSpec)')" /> + </ItemGroup> + + <ItemGroup> + <_NonPkgProjProjectReference Remove="@(_NonPkgProjProjectReference)" /> + <_NonPkgProjProjectReference Include="@(_NonPkgProjProjectReferenceWitnConfiguration)" /> + </ItemGroup> + </Target> + <!-- Runs during traversal to select which projects and configurations of those projects to build Batches over the projects because we need to treat BuildConfigurations as a Property as well as copy the Project based on results of FindBestConfigurations. --> @@ -81,6 +107,20 @@ </PropertyGroup> </Target> + <!-- Runs in a leaf project (eg: csproj) to determine configurations to package --> + <Target Name="GetPackageConfigurations" + Returns="$(PackageConfigurations)"> + <ItemGroup Condition="'$(PackageConfigurations)' == ''"> + <_buildConfigurations Include="$(BuildConfigurations)" /> + <_excludeBuildConfigurations Include="@(_buildConfigurations)" Condition="'$(IsReferenceAssembly)' == 'true' AND ('%(Identity)' == 'netfx' OR $([System.String]::new('%(Identity)').StartsWith('net4')))"/> + <_packageConfigurations Include="@(_buildConfigurations)" Exclude="@(_excludeBuildConfigurations)" /> + </ItemGroup> + + <PropertyGroup Condition="'$(PackageConfigurations)' == ''"> + <PackageConfigurations>@(_packageConfigurations)</PackageConfigurations> + </PropertyGroup> + </Target> + <!-- Runs in a leaf project (csproj) to determine best configuration for ProjectReferences --> <Target Name="AnnotateProjectReference" BeforeTargets="AssignProjectConfiguration" |