diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs b/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs index d5b3e5d58d64..b8e0f86e8736 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs @@ -52,6 +52,8 @@ public class ProcessFrameworkReferences : TaskBase public bool EnableTargetingPackDownload { get; set; } + public bool EnableRuntimePackDownload { get; set; } + public ITaskItem[] FrameworkReferences { get; set; } = Array.Empty(); public ITaskItem[] KnownFrameworkReferences { get; set; } = Array.Empty(); @@ -286,7 +288,7 @@ var runtimeRequiredByDeployment } ProcessRuntimeIdentifier(hasRuntimePackAlwaysCopyLocal ? "any" : RuntimeIdentifier, runtimePackForRuntimeIDProcessing, runtimePackVersion, additionalFrameworkReferencesForRuntimePack, - unrecognizedRuntimeIdentifiers, unavailableRuntimePacks, runtimePacks, packagesToDownload, isTrimmable, includeInPackageDownload); + unrecognizedRuntimeIdentifiers, unavailableRuntimePacks, runtimePacks, packagesToDownload, isTrimmable, EnableRuntimePackDownload && includeInPackageDownload); processedPrimaryRuntimeIdentifier = true; } diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets index 32eb2dded808..bda1b4957748 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets @@ -48,8 +48,9 @@ Copyright (c) .NET Foundation. All rights reserved. - - true + + true + true @@ -78,6 +79,7 @@ Copyright (c) .NET Foundation. All rights reserved. TargetLatestRuntimePatch="$(TargetLatestRuntimePatch)" TargetLatestRuntimePatchIsDefault="$(_TargetLatestRuntimePatchIsDefault)" EnableTargetingPackDownload="$(EnableTargetingPackDownload)" + EnableRuntimePackDownload="$(EnableRuntimePackDownload)" KnownCrossgen2Packs="@(KnownCrossgen2Pack)" NETCoreSdkRuntimeIdentifier="$(NETCoreSdkRuntimeIdentifier)">