Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSantiago Fernandez Madero <safern@microsoft.com>2020-12-11 05:01:16 +0300
committerGitHub <noreply@github.com>2020-12-11 05:01:16 +0300
commit30be1b934bf2ccc53235121e9446a61165d86dd6 (patch)
tree0208e04aee4562403a1d760ffc8ba4e8946c1030 /eng/targetingpacks.targets
parentc82d66dd227eb7c31cbdb7797baa61b878ed3580 (diff)
Add workaround to remove runtime pack from download to use local runtime pack (#45922)
* Add workaround to remove runtime pack from download to use local runtime pack * PR Feedback * Add support for full msbuild
Diffstat (limited to 'eng/targetingpacks.targets')
-rw-r--r--eng/targetingpacks.targets12
1 files changed, 12 insertions, 0 deletions
diff --git a/eng/targetingpacks.targets b/eng/targetingpacks.targets
index 0d332e688d0..13eb704b62e 100644
--- a/eng/targetingpacks.targets
+++ b/eng/targetingpacks.targets
@@ -87,6 +87,18 @@
</PropertyGroup>
</Target>
+ <!-- SDK tries to download runtime packs when RuntimeIdentifier is set, remove them from PackageDownload item. -->
+ <Target Name="RemoveRuntimePackFromDownloadItem"
+ Condition="'$(_UseLocalTargetingRuntimePack)' == 'true'"
+ AfterTargets="ProcessFrameworkReferences">
+ <ItemGroup>
+ <PackageDownload Remove="@(PackageDownload)"
+ Condition="'$(UsePackageDownload)' == 'true' and $([System.String]::Copy('%(Identity)').StartsWith('$(SharedFrameworkName).Runtime'))" />
+ <PackageReference Remove="@(PackageReference)"
+ Condition="'$(UsePackageDownload)' != 'true' and $([System.String]::Copy('%(Identity)').StartsWith('$(SharedFrameworkName).Runtime'))" />
+ </ItemGroup>
+ </Target>
+
<!-- Use local targeting pack for NetCoreAppCurrent. -->
<Target Name="UpdateTargetingAndRuntimePack"
Condition="'$(_UseLocalTargetingRuntimePack)' == 'true'"