-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from onovotny/rids-take-2
Build each RID on the inner loop
- Loading branch information
Showing
5 changed files
with
246 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,192 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<PropertyGroup> | ||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | ||
</PropertyGroup> | ||
|
||
<Target Name="_SdkGetRidsPerTargetFramework" Returns="@(_SdkRuntimeId)"> | ||
|
||
<PropertyGroup> | ||
<ExtrasBuildEachRuntimeIdentifier Condition="'$(ExtrasBuildEachRuntimeIdentifier)' == ''">false</ExtrasBuildEachRuntimeIdentifier> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<_SdkRuntimeIds Include="$(RuntimeIdentifiers)" Condition="'$(RuntimeIdentifiers)' != '' and '$(ExtrasBuildEachRuntimeIdentifier)' == 'true' " TargetFramework="$(TargetFramework)" /> | ||
|
||
<_SdkRuntimeId Include="@(_SdkRuntimeIds->'%(TargetFramework)')" Rid="%(_SdkRuntimeIds.Identity)" /> | ||
<_SdkRuntimeId Include="$(TargetFramework)" Condition="'$(ExtrasBuildEachRuntimeIdentifier)' == 'false'" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
|
||
|
||
<Target Name="_ComputeTargetFrameworkItems" Returns="@(InnerOutput)"> | ||
<ItemGroup> | ||
<_TargetFramework Include="$(TargetFrameworks)" /> | ||
</ItemGroup> | ||
|
||
<MSBuild Projects="$(MSBuildProjectFile)" | ||
BuildInParallel="$(BuildInParallel)" | ||
Properties="TargetFramework=%(_TargetFramework.Identity)" | ||
Targets="_SdkGetRidsPerTargetFramework"> | ||
<Output ItemName="_SdkTargetsWithRids" TaskParameter="TargetOutputs" /> | ||
</MSBuild> | ||
|
||
<ItemGroup> | ||
<_InnerBuildProjects Include="$(MSBuildProjectFile)"> | ||
<AdditionalProperties Condition="'%(_SdkTargetsWithRids.Rid)' != ''" >TargetFramework=%(_SdkTargetsWithRids.Identity);RuntimeIdentifier=%(_SdkTargetsWithRids.Rid)</AdditionalProperties> | ||
<AdditionalProperties Condition="'%(_SdkTargetsWithRids.Rid)' == ''" >TargetFramework=%(_SdkTargetsWithRids.Identity)</AdditionalProperties> | ||
</_InnerBuildProjects> | ||
</ItemGroup> | ||
</Target> | ||
|
||
|
||
|
||
<Target Name="_WalkEachTargetPerFramework"> | ||
<MSBuild Projects="$(MSBuildProjectFile)" | ||
BuildInParallel="$(BuildInParallel)" | ||
Properties="TargetFramework=%(_TargetFrameworks.Identity)" | ||
Targets="_SdkGetRidsPerTargetFramework"> | ||
<Output ItemName="_SdkTargetsWithRids" TaskParameter="TargetOutputs" /> | ||
</MSBuild> | ||
|
||
<MSBuild | ||
Condition="'$(IncludeBuildOutput)' == 'true' and '%(_SdkTargetsWithRids.Rid)' != ''" | ||
Projects="$(MSBuildProjectFullPath)" | ||
Targets="_SdkGetBuildOutputFilesWithTfm" | ||
Properties="TargetFramework=%(_SdkTargetsWithRids.Identity);RuntimeIdentifier=%(_SdkTargetsWithRids.Rid)"> | ||
|
||
<Output | ||
TaskParameter="TargetOutputs" | ||
ItemName="_BuildOutputInPackageWithRid" /> | ||
</MSBuild> | ||
|
||
<MSBuild | ||
Condition="'$(IncludeBuildOutput)' == 'true' and '%(_SdkTargetsWithRids.Rid)' == ''" | ||
Projects="$(MSBuildProjectFullPath)" | ||
Targets="_GetBuildOutputFilesWithTfm" | ||
Properties="TargetFramework=%(_SdkTargetsWithRids.Identity);"> | ||
|
||
<Output | ||
TaskParameter="TargetOutputs" | ||
ItemName="_BuildOutputInPackage" /> | ||
</MSBuild> | ||
|
||
<MSBuild | ||
Condition="'$(TargetsForTfmSpecificContentInPackage)' != '' and '%(_SdkTargetsWithRids.Rid)' != ''" | ||
Projects="$(MSBuildProjectFullPath)" | ||
Targets="_GetTfmSpecificContentForPackage" | ||
Properties="TargetFramework=%(_SdkTargetsWithRids.Identity);RuntimeIdentifier=%(_SdkTargetsWithRids.Rid)"> | ||
|
||
<Output | ||
TaskParameter="TargetOutputs" | ||
ItemName="_PackageFiles"/> | ||
</MSBuild> | ||
|
||
<MSBuild | ||
Condition="'$(TargetsForTfmSpecificContentInPackage)' != '' and '%(_SdkTargetsWithRids.Rid)' == ''" | ||
Projects="$(MSBuildProjectFullPath)" | ||
Targets="_GetTfmSpecificContentForPackage" | ||
Properties="TargetFramework=%(_SdkTargetsWithRids.Identity);"> | ||
|
||
<Output | ||
TaskParameter="TargetOutputs" | ||
ItemName="_PackageFiles"/> | ||
</MSBuild> | ||
|
||
<MSBuild | ||
Condition="'$(IncludeBuildOutput)' == 'true' and '%(_SdkTargetsWithRids.Rid)' != ''" | ||
Projects="$(MSBuildProjectFullPath)" | ||
Targets="_SdkGetDebugSymbolsWithTfm" | ||
Properties="TargetFramework=%(_SdkTargetsWithRids.Identity);RuntimeIdentifier=%(_SdkTargetsWithRids.Rid)"> | ||
|
||
<Output | ||
TaskParameter="TargetOutputs" | ||
ItemName="_TargetPathsToSymbolsWithRid" /> | ||
</MSBuild> | ||
|
||
<MSBuild | ||
Condition="'$(IncludeBuildOutput)' == 'true' and '%(_SdkTargetsWithRids.Rid)' == ''" | ||
Projects="$(MSBuildProjectFullPath)" | ||
Targets="_GetDebugSymbolsWithTfm" | ||
Properties="TargetFramework=%(_SdkTargetsWithRids.Identity);"> | ||
|
||
<Output | ||
TaskParameter="TargetOutputs" | ||
ItemName="_TargetPathsToSymbols" /> | ||
</MSBuild> | ||
|
||
<MSBuild | ||
Condition="'$(IncludeSource)' == 'true' and '%(_SdkTargetsWithRids.Rid)' == ''" | ||
Projects="$(MSBuildProjectFullPath)" | ||
Targets="SourceFilesProjectOutputGroup" | ||
Properties="TargetFramework=%(_SdkTargetsWithRids.Identity); | ||
BuildProjectReferences=false;"> | ||
|
||
<Output | ||
TaskParameter="TargetOutputs" | ||
ItemName="_SourceFiles" /> | ||
</MSBuild> | ||
|
||
<MSBuild | ||
Projects="$(MSBuildProjectFullPath)" | ||
Targets="_GetFrameworkAssemblyReferences" | ||
Properties="TargetFramework=%(_TargetFrameworks.Identity); | ||
BuildProjectReferences=false;"> | ||
|
||
<Output | ||
TaskParameter="TargetOutputs" | ||
ItemName="_FrameworkAssemblyReferences" /> | ||
</MSBuild> | ||
|
||
<MSBuild | ||
Projects="$(MSBuildProjectFullPath)" | ||
Targets="_GetFrameworksWithSuppressedDependencies" | ||
Properties="TargetFramework=%(_TargetFrameworks.Identity); | ||
BuildProjectReferences=false;"> | ||
|
||
<Output | ||
TaskParameter="TargetOutputs" | ||
ItemName="_FrameworksWithSuppressedDependencies" /> | ||
</MSBuild> | ||
|
||
<ItemGroup> | ||
|
||
<!-- Include the runtimes files --> | ||
<None Include="@(_BuildOutputInPackageWithRid)" PackagePath="runtimes/%(_BuildOutputInPackageWithRid.Rid)/lib/%(_BuildOutputInPackageWithRid.TargetFramework)" Pack="true" /> | ||
<None Include="@(_TargetPathsToSymbolsWithRid)" PackagePath="runtimes/%(_BuildOutputInPackageWithRid.Rid)/lib/%(_BuildOutputInPackageWithRid.TargetFramework)" Pack="true" /> | ||
</ItemGroup> | ||
|
||
</Target> | ||
|
||
|
||
<Target Name="_SdkGetBuildOutputFilesWithTfm" DependsOnTargets="_GetBuildOutputFilesWithTfm" Returns="@(BuildOutputInPackage)"> | ||
|
||
<ItemGroup> | ||
<BuildOutputInPackage Update="@(BuildOutputInPackage)" Rid="$(RuntimeIdentifier)" /> | ||
</ItemGroup> | ||
|
||
</Target> | ||
|
||
<Target Name="_SdkGetDebugSymbolsWithTfm" DependsOnTargets="_GetDebugSymbolsWithTfm" Returns="@(_TargetPathsToSymbolsWithTfm)"> | ||
|
||
<ItemGroup> | ||
<_TargetPathsToSymbolsWithTfm Update="@(_TargetPathsToSymbolsWithTfm)" Rid="$(RuntimeIdentifier)" /> | ||
</ItemGroup> | ||
|
||
</Target> | ||
|
||
|
||
<Target Name="_ExtrasPackageRuntimeFiles" BeforeTargets="_GetPackageFiles" > | ||
|
||
<MSBuild Projects="$(MSBuildProjectFile)" | ||
BuildInParallel="$(BuildInParallel)" | ||
Properties="TargetFramework=%(_TargetFramework.Identity)" | ||
Targets="_SdkGetRidsPerTargetFramework"> | ||
<Output ItemName="_SdkTargetsWithRids" TaskParameter="TargetOutputs" /> | ||
</MSBuild> | ||
|
||
|
||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters