Skip to content

Commit

Permalink
Allow runtime packs to not be downloaded
Browse files Browse the repository at this point in the history
Simliar to the EnableTargetingPackDownload property,
EnableRuntimePackDownload controls if a runtime pack is downloaded (i.e.
when a RuntimeIdentifier is specified.)
  • Loading branch information
ViktorHofer committed Feb 18, 2021
1 parent b17465f commit 7d4dc3c
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 7d4dc3c

Please sign in to comment.