Lidarr/src/PublishAllRids.targets

38 lines
1.3 KiB
XML

<Project DefaultTargets="Build">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<!-- Enable roll-forward to latest patch. This allows one restore operation
to apply to all of the self-contained publish operations. -->
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
</PropertyGroup>
<Target Name="PublishAllRids">
<ItemGroup>
<!-- Transform RuntimeIdentifiers property to item -->
<Runtimes Include="$(RuntimeIdentifiers)" />
<Frameworks Include="$(TargetFrameworks)" />
<Combined1 Include="@(Runtimes)">
<Runtime>%(Runtimes.Identity)</Runtime>
</Combined1>
<Combined2 Include="@(Combined1)">
<Framework>%(Frameworks.Identity)</Framework>
</Combined2>
<!-- Transform RuntimeIdentifierForPublish items to project items to pass to MSBuild task -->
<ProjectToPublish Include="@(Combined2->'$(MSBuildProjectFullPath)')">
<AdditionalProperties>RuntimeIdentifier=%(Combined2.Runtime);TargetFramework=%(Combined2.Framework)</AdditionalProperties>
</ProjectToPublish>
</ItemGroup>
<MSBuild Projects="@(ProjectToPublish)"
Targets="Publish"
BuildInParallel="true"
/>
</Target>
</Project>