Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions eng/targetingpacks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<PropertyGroup Condition="'$(DisableImplicitFrameworkReferences)' != 'true' and
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '$(NETCoreAppCurrentVersion)'))">
<_UseLocalTargetingRuntimePack>true</_UseLocalTargetingRuntimePack>
<UseLocalTargetingRuntimePack Condition="'$(UseLocalTargetingRuntimePack)' == ''">true</UseLocalTargetingRuntimePack>
<EnableTargetingPackDownload>false</EnableTargetingPackDownload>
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
</PropertyGroup>

<!-- Add Known* items if the SDK doesn't support the TargetFramework yet. -->
<ItemGroup Condition="'$(_UseLocalTargetingRuntimePack)' == 'true'">
<ItemGroup Condition="'$(UseLocalTargetingRuntimePack)' == 'true'">
<KnownFrameworkReference Include="$(LocalFrameworkOverrideName)"
DefaultRuntimeFrameworkVersion="$(ProductVersion)"
IsTrimmable="true"
Expand Down Expand Up @@ -69,7 +69,7 @@
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '3.0'))">
<!-- Point MicrosoftNetCoreAppRefPackRefDir to the acquired targeting pack to use it later for AssemblySearchPaths resolution. -->
<PropertyGroup Condition="'$(_UseLocalTargetingRuntimePack)' != 'true'">
<PropertyGroup Condition="'$(UseLocalTargetingRuntimePack)' != 'true'">
<_NetCoreAppTargetFrameworkIdentifier Condition="$([MSBuild]::VersionLessThan($(TargetFrameworkVersion), '5.0'))">netcoreapp</_NetCoreAppTargetFrameworkIdentifier>
<_NetCoreAppTargetFrameworkIdentifier Condition="$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '5.0'))">net</_NetCoreAppTargetFrameworkIdentifier>
<MicrosoftNetCoreAppRefPackRefDir>%(ResolvedFrameworkReference.TargetingPackPath)\ref\$(_NetCoreAppTargetFrameworkIdentifier)$(TargetFrameworkVersion.TrimStart('v'))\</MicrosoftNetCoreAppRefPackRefDir>
Expand All @@ -93,7 +93,7 @@

<!-- SDK tries to download runtime packs when RuntimeIdentifier is set, remove them from PackageDownload item. -->
<Target Name="RemoveRuntimePackFromDownloadItem"
Condition="'$(_UseLocalTargetingRuntimePack)' == 'true'"
Condition="'$(UseLocalTargetingRuntimePack)' == 'true'"
AfterTargets="ProcessFrameworkReferences">
<ItemGroup>
<PackageDownload Remove="@(PackageDownload)"
Expand All @@ -105,7 +105,7 @@

<!-- Use local targeting pack for NetCoreAppCurrent. -->
<Target Name="UpdateTargetingAndRuntimePack"
Condition="'$(_UseLocalTargetingRuntimePack)' == 'true'"
Condition="'$(UseLocalTargetingRuntimePack)' == 'true'"
AfterTargets="ResolveFrameworkReferences">
<ItemGroup>
<ResolvedTargetingPack Path="$(MicrosoftNetCoreAppRefPackDir.TrimEnd('/\'))"
Expand All @@ -123,7 +123,7 @@

<!-- Update the local targeting pack's version as it's written into the runtimeconfig.json file to select the right framework. -->
<Target Name="UpdateRuntimeFrameworkVersion"
Condition="'$(_UseLocalTargetingRuntimePack)' == 'true'"
Condition="'$(UseLocalTargetingRuntimePack)' == 'true'"
AfterTargets="ResolveTargetingPackAssets">
<ItemGroup>
<RuntimeFramework Version="$(ProductVersion)"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<Project Sdk="Microsoft.NET.SDK">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppToolCurrent);net472</TargetFrameworks>
<!-- This project should not build against the live built .NETCoreApp targeting pack as it contributes to the build itself. -->
<UseLocalTargetingRuntimePack>false</UseLocalTargetingRuntimePack>
<PackageId>$(MSBuildProjectName)</PackageId>
<AvoidRestoreCycleOnSelfReference>true</AvoidRestoreCycleOnSelfReference>
<AssemblyName>Microsoft.NETCore.Platforms.BuildTasks</AssemblyName>
Expand Down