Skip to content

Commit

Permalink
Merge pull request #15944 from ViktorHofer/DisableRuntimePackDownload
Browse files Browse the repository at this point in the history
Allow runtime packs to not be downloaded
  • Loading branch information
dsplaisted authored Feb 24, 2021
2 parents 5b4c443 + 7d4dc3c commit 11ae25b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<ITaskItem>();

public ITaskItem[] KnownFrameworkReferences { get; set; } = Array.Empty<ITaskItem>();
Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ Copyright (c) .NET Foundation. All rights reserved.
<FrameworkReference Include="@(_FrameworkReferenceToAdd)" />
</ItemGroup>

<PropertyGroup Condition="'$(EnableTargetingPackDownload)' == ''">
<EnableTargetingPackDownload>true</EnableTargetingPackDownload>
<PropertyGroup>
<EnableTargetingPackDownload Condition="'$(EnableTargetingPackDownload)' == ''">true</EnableTargetingPackDownload>
<EnableRuntimePackDownload Condition="'$(EnableRuntimePackDownload)' == ''">true</EnableRuntimePackDownload>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -78,6 +79,7 @@ Copyright (c) .NET Foundation. All rights reserved.
TargetLatestRuntimePatch="$(TargetLatestRuntimePatch)"
TargetLatestRuntimePatchIsDefault="$(_TargetLatestRuntimePatchIsDefault)"
EnableTargetingPackDownload="$(EnableTargetingPackDownload)"
EnableRuntimePackDownload="$(EnableRuntimePackDownload)"
KnownCrossgen2Packs="@(KnownCrossgen2Pack)"
NETCoreSdkRuntimeIdentifier="$(NETCoreSdkRuntimeIdentifier)">

Expand Down

0 comments on commit 11ae25b

Please sign in to comment.