Use .Ref targeting packs and include in layout under packs folder
This commit is contained in:
parent
703e3fd469
commit
faad6455bc
2 changed files with 73 additions and 8 deletions
|
@ -161,6 +161,8 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
-->
|
-->
|
||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<NetCoreTargetingPackRoot Condition="'%24(NetCoreTargetingPackRoot)' == ''">%24([MSBuild]::NormalizePath('%24(MSBuildThisFileDirectory)..\..\packs'))</NetCoreTargetingPackRoot>
|
||||||
|
|
||||||
<NETCoreAppMaximumVersion>$(_NETCoreAppTargetFrameworkVersion)</NETCoreAppMaximumVersion>
|
<NETCoreAppMaximumVersion>$(_NETCoreAppTargetFrameworkVersion)</NETCoreAppMaximumVersion>
|
||||||
<BundledNETCoreAppTargetFrameworkVersion>$(_NETCoreAppTargetFrameworkVersion)</BundledNETCoreAppTargetFrameworkVersion>
|
<BundledNETCoreAppTargetFrameworkVersion>$(_NETCoreAppTargetFrameworkVersion)</BundledNETCoreAppTargetFrameworkVersion>
|
||||||
<BundledNETCoreAppPackageVersion>$(_NETCoreAppPackageVersion)</BundledNETCoreAppPackageVersion>
|
<BundledNETCoreAppPackageVersion>$(_NETCoreAppPackageVersion)</BundledNETCoreAppPackageVersion>
|
||||||
|
@ -199,8 +201,8 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
RuntimeFrameworkName="Microsoft.NETCore.App"
|
RuntimeFrameworkName="Microsoft.NETCore.App"
|
||||||
DefaultRuntimeFrameworkVersion="$(_NETCoreAppPackageVersion)"
|
DefaultRuntimeFrameworkVersion="$(_NETCoreAppPackageVersion)"
|
||||||
LatestRuntimeFrameworkVersion="$(_NETCoreAppPackageVersion)"
|
LatestRuntimeFrameworkVersion="$(_NETCoreAppPackageVersion)"
|
||||||
TargetingPackName="Microsoft.NETCore.App"
|
TargetingPackName="Microsoft.NETCore.App.Ref"
|
||||||
TargetingPackVersion="$(_NETCoreAppPackageVersion)"
|
TargetingPackVersion="$(NetCoreAppTargetingPackVersion)"
|
||||||
AppHostPackNamePattern="runtime.**RID**.Microsoft.NETCore.DotNetAppHost"
|
AppHostPackNamePattern="runtime.**RID**.Microsoft.NETCore.DotNetAppHost"
|
||||||
AppHostRuntimeIdentifiers="@(NetCoreRuntimePackRids, '%3B')"
|
AppHostRuntimeIdentifiers="@(NetCoreRuntimePackRids, '%3B')"
|
||||||
RuntimePackNamePatterns="runtime.**RID**.Microsoft.NETCore.App%3Bruntime.**RID**.Microsoft.NETCore.DotNetHostResolver%3Bruntime.**RID**.Microsoft.NETCore.DotNetHostPolicy"
|
RuntimePackNamePatterns="runtime.**RID**.Microsoft.NETCore.App%3Bruntime.**RID**.Microsoft.NETCore.DotNetHostResolver%3Bruntime.**RID**.Microsoft.NETCore.DotNetHostPolicy"
|
||||||
|
@ -230,8 +232,8 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
RuntimeFrameworkName="Microsoft.AspNetCore.App"
|
RuntimeFrameworkName="Microsoft.AspNetCore.App"
|
||||||
DefaultRuntimeFrameworkVersion="$(MicrosoftAspNetCoreAppPackageVersion)"
|
DefaultRuntimeFrameworkVersion="$(MicrosoftAspNetCoreAppPackageVersion)"
|
||||||
LatestRuntimeFrameworkVersion="$(MicrosoftAspNetCoreAppPackageVersion)"
|
LatestRuntimeFrameworkVersion="$(MicrosoftAspNetCoreAppPackageVersion)"
|
||||||
TargetingPackName="Microsoft.AspNetCore.App"
|
TargetingPackName="Microsoft.AspNetCore.App.Ref"
|
||||||
TargetingPackVersion="$(MicrosoftAspNetCoreAppPackageVersion)"
|
TargetingPackVersion="$(AspNetTargetingPackVersion)"
|
||||||
RuntimePackNamePatterns="runtime.**RID**.Microsoft.AspNetCore.App"
|
RuntimePackNamePatterns="runtime.**RID**.Microsoft.AspNetCore.App"
|
||||||
RuntimePackRuntimeIdentifiers="@(AspNetCoreRuntimePackRids, '%3B')"
|
RuntimePackRuntimeIdentifiers="@(AspNetCoreRuntimePackRids, '%3B')"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -70,6 +70,18 @@
|
||||||
<RelativeLayoutPath></RelativeLayoutPath>
|
<RelativeLayoutPath></RelativeLayoutPath>
|
||||||
</BundledLayoutComponent>
|
</BundledLayoutComponent>
|
||||||
|
|
||||||
|
<BundledLayoutPackage Include="MicrosoftNetCoreAppTargetingPackNupkg">
|
||||||
|
<PackageName>Microsoft.NETCore.App.Ref</PackageName>
|
||||||
|
<PackageVersion>$(NetCoreAppTargetingPackVersion)</PackageVersion>
|
||||||
|
<RelativeLayoutPath>packs/%(PackageName)/%(PackageVersion)</RelativeLayoutPath>
|
||||||
|
</BundledLayoutPackage>
|
||||||
|
|
||||||
|
<BundledLayoutPackage Include="MicrosoftAspNetCoreAppTargetingPackNupkg">
|
||||||
|
<PackageName>Microsoft.AspNetCore.App.Ref</PackageName>
|
||||||
|
<PackageVersion>$(AspNetTargetingPackVersion)</PackageVersion>
|
||||||
|
<RelativeLayoutPath>packs/%(PackageName)/%(PackageVersion)</RelativeLayoutPath>
|
||||||
|
</BundledLayoutPackage>
|
||||||
|
|
||||||
<BundledInstallerComponent Include="DownloadedRuntimeDepsInstallerFile"
|
<BundledInstallerComponent Include="DownloadedRuntimeDepsInstallerFile"
|
||||||
Condition="('$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true') And '$(SkipBuildingInstallers)' != 'true' And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
Condition="('$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true') And '$(SkipBuildingInstallers)' != 'true' And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||||
<BaseUrl>$(CoreSetupRootUrl)$(MicrosoftNETCoreAppPackageVersion)</BaseUrl>
|
<BaseUrl>$(CoreSetupRootUrl)$(MicrosoftNETCoreAppPackageVersion)</BaseUrl>
|
||||||
|
@ -183,7 +195,52 @@
|
||||||
<DownloadFile Condition=" '@(ComponentToDownload)' != '' And '%(ComponentToDownload.ShouldDownload)' == 'true'"
|
<DownloadFile Condition=" '@(ComponentToDownload)' != '' And '%(ComponentToDownload.ShouldDownload)' == 'true'"
|
||||||
Uri="%(ComponentToDownload.BaseUrl)/%(ComponentToDownload.DownloadFileName)"
|
Uri="%(ComponentToDownload.BaseUrl)/%(ComponentToDownload.DownloadFileName)"
|
||||||
DestinationPath="%(ComponentToDownload.DownloadDestination)" />
|
DestinationPath="%(ComponentToDownload.DownloadDestination)" />
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<BundledLayoutPackageDownloadProject Include="$(MSBuildThisFileDirectory)DownloadPackage.csproj">
|
||||||
|
<Properties>
|
||||||
|
PackageToRestore=%(BundledLayoutPackage.PackageName);
|
||||||
|
PackageVersionToRestore=%(BundledLayoutPackage.PackageVersion);
|
||||||
|
TargetFramework=$(TargetFramework);
|
||||||
|
LayoutPackageDescription=%(BundledLayoutPackage.Identity)
|
||||||
|
</Properties>
|
||||||
|
</BundledLayoutPackageDownloadProject>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<MSBuild
|
||||||
|
BuildInParallel="False"
|
||||||
|
Projects="@(BundledLayoutPackageDownloadProject)">
|
||||||
|
</MSBuild>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- Use lowercase package name in package path -->
|
||||||
|
<BundledLayoutPackage>
|
||||||
|
<LoweredPackageName>$([MSBuild]::ValueOrDefault('%(BundledLayoutPackage.PackageName)', '').ToLower())</LoweredPackageName>
|
||||||
|
</BundledLayoutPackage>
|
||||||
|
|
||||||
|
<BundledLayoutPackageDownloadFiles Include="$(NuGetPackageRoot)\%(BundledLayoutPackage.LoweredPackageName)\%(BundledLayoutPackage.PackageVersion)\**\*.*">
|
||||||
|
<RelativeLayoutPath>%(BundledLayoutPackage.RelativeLayoutPath)</RelativeLayoutPath>
|
||||||
|
<LayoutPackageDescription>%(BundledLayoutPackage.Identity)</LayoutPackageDescription>
|
||||||
|
</BundledLayoutPackageDownloadFiles>
|
||||||
|
|
||||||
|
<!-- Remove files from the root of the package, as these are either files NuGet writes, or not necessary -->
|
||||||
|
<BundledLayoutPackageDownloadFiles Remove="$(NuGetPackageRoot)\%(BundledLayoutPackage.LoweredPackageName)\%(BundledLayoutPackage.PackageVersion)\*.*" />
|
||||||
|
|
||||||
|
<!-- Set destination path in layout -->
|
||||||
|
<BundledLayoutPackageDownloadFiles>
|
||||||
|
<DestinationPath>%(BundledLayoutPackageDownloadFiles.RecursiveDir)%(BundledLayoutPackageDownloadFiles.Filename)%(BundledLayoutPackageDownloadFiles.Extension)</DestinationPath>
|
||||||
|
</BundledLayoutPackageDownloadFiles>
|
||||||
|
<BundledLayoutPackageDownloadFiles>
|
||||||
|
<DestinationPath>$(RedistLayoutPath)/%(BundledLayoutPackageDownloadFiles.RelativeLayoutPath)/%(BundledLayoutPackageDownloadFiles.DestinationPath)</DestinationPath>
|
||||||
|
</BundledLayoutPackageDownloadFiles>
|
||||||
|
<BundledLayoutPackageDownloadFiles>
|
||||||
|
<DestinationPath>$([MSBuild]::NormalizePath(%(BundledLayoutPackageDownloadFiles.DestinationPath)))</DestinationPath>
|
||||||
|
</BundledLayoutPackageDownloadFiles>
|
||||||
|
|
||||||
|
<!-- Creating a new item here isn't strictly necessary, but makes it easier to see what's going on in the .binlog,
|
||||||
|
since the metadata updates don't show up there -->
|
||||||
|
<BundledLayoutPackageDownloadFilesWithDestination Include="@(BundledLayoutPackageDownloadFiles)"/>
|
||||||
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="CleanLayoutPath">
|
<Target Name="CleanLayoutPath">
|
||||||
|
@ -192,9 +249,15 @@
|
||||||
<MakeDir Directories="$(RedistLayoutPath)" />
|
<MakeDir Directories="$(RedistLayoutPath)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="ExtractBundledComponents">
|
<Target Name="LayoutBundledComponents">
|
||||||
<ExtractArchiveToDirectory SourceArchive="%(BundledLayoutComponent.DownloadDestination)"
|
<ExtractArchiveToDirectory SourceArchive="%(BundledLayoutComponent.DownloadDestination)"
|
||||||
DestinationDirectory="$(RedistLayoutPath)/%(BundledLayoutComponent.RelativeLayoutPath)" />
|
DestinationDirectory="$(RedistLayoutPath)/%(BundledLayoutComponent.RelativeLayoutPath)" />
|
||||||
|
|
||||||
|
<Copy SourceFiles="@(BundledLayoutPackageDownloadFilesWithDestination)"
|
||||||
|
DestinationFiles="@(BundledLayoutPackageDownloadFilesWithDestination->'%(DestinationPath)')"
|
||||||
|
SkipUnchangedFiles="true"
|
||||||
|
/>
|
||||||
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="RetargetTools">
|
<Target Name="RetargetTools">
|
||||||
|
@ -285,7 +348,7 @@
|
||||||
<Target Name="GenerateLayout"
|
<Target Name="GenerateLayout"
|
||||||
DependsOnTargets="DownloadBundledComponents;
|
DependsOnTargets="DownloadBundledComponents;
|
||||||
CleanLayoutPath;
|
CleanLayoutPath;
|
||||||
ExtractBundledComponents;
|
LayoutBundledComponents;
|
||||||
GenerateVersionFile;
|
GenerateVersionFile;
|
||||||
GenerateBundledVersions;
|
GenerateBundledVersions;
|
||||||
LayoutRuntimeGraph;
|
LayoutRuntimeGraph;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue