Add option for only packing runtime-specific packages (#11116)

* Add option for only packing runtime-specific packages
* Remove Microsoft.AspNetCore.Blazor.Templates.dll from the Blazor VSIX
* Cleanup implementation of ANCMSymbols packaging
This commit is contained in:
Nate McMaster 2019-06-11 20:47:10 -07:00 коммит произвёл GitHub
Родитель dd2e2186db
Коммит 6c806f91b1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
13 изменённых файлов: 65 добавлений и 82 удалений

Просмотреть файл

@ -75,6 +75,7 @@ jobs:
-NoRestore
-BuildNative
/t:BuildSharedFx
/p:OnlyPackPlatformSpecificPackages=true
/p:DisableCodeSigning=true
/bl:artifacts/log/build.x86.binlog
$(_BuildArgs)
@ -151,15 +152,12 @@ jobs:
buildArgs: -arch arm
-NoBuildNodeJS
-NoBuildJava
/p:OnlyPackPlatformSpecificPackages=true
/p:SignType=$(_SignType)
/bl:artifacts/log/build.win-arm.binlog
$(_BuildArgs)
installNodeJs: false
installJdk: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so builds only produce runtime packages
- powershell: gci artifacts/packages/ -recurse -exclude 'runtime.*', 'Microsoft.AspNetCore.App.Runtime.*' -file | rm -ea ignore
artifacts:
- name: Windows_arm_Packages
path: artifacts/packages/
@ -180,14 +178,10 @@ jobs:
buildScript: ./eng/scripts/cibuild.sh
buildArgs: --no-build-nodejs
--no-build-java
/bl:artifacts/log/build.macos.binlog
-p:OnlyPackPlatformSpecificPackages=true
-bl:artifacts/log/build.macos.binlog
$(_BuildArgs)
installNodeJs: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -not -name 'Microsoft.AspNetCore.App.Runtime.*' -delete; fi
condition: always()
artifacts:
- name: MacOS_x64_Packages
path: artifacts/packages/
@ -214,7 +208,8 @@ jobs:
--arch x64
--no-build-nodejs
--no-build-java
/bl:artifacts/log/build.linux-x64.binlog
-p:OnlyPackPlatformSpecificPackages=true
-bl:artifacts/log/build.linux-x64.binlog
$(_BuildArgs)
displayName: Run cibuild.sh
- script: |
@ -226,10 +221,11 @@ jobs:
-e KOREBUILD_SKIP_INSTALL_NETFX=0 \
--no-restore \
--no-build-deps \
/t:BuildSharedFx \
/p:BuildRuntimeArchive=false \
/p:LinuxInstallerType=deb \
/bl:artifacts/log/build.deb.binlog \
-t:BuildSharedFx \
-p:OnlyPackPlatformSpecificPackages=true \
-p:BuildRuntimeArchive=false \
-p:LinuxInstallerType=deb \
-bl:artifacts/log/build.deb.binlog \
$(_BuildArgs)
displayName: Build Debian installers
- script: |
@ -241,17 +237,13 @@ jobs:
-e KOREBUILD_SKIP_INSTALL_NETFX=0 \
--no-restore \
--no-build-deps \
/t:BuildSharedFx \
/p:BuildRuntimeArchive=false \
/p:LinuxInstallerType=rpm \
/bl:artifacts/log/build.rpm.binlog \
-t:BuildSharedFx \
-p:OnlyPackPlatformSpecificPackages=true \
-p:BuildRuntimeArchive=false \
-p:LinuxInstallerType=rpm \
-bl:artifacts/log/build.rpm.binlog \
$(_BuildArgs)
displayName: Build RPM installers
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -not -name 'Microsoft.AspNetCore.App.Runtime.*' -delete; fi
condition: always()
artifacts:
- name: Linux_x64_Packages
path: artifacts/packages/
@ -276,14 +268,10 @@ jobs:
buildArgs: --arch arm
--no-build-nodejs
--no-build-java
/bl:artifacts/log/build.linux-arm.binlog
-p:OnlyPackPlatformSpecificPackages=true
-bl:artifacts/log/build.linux-arm.binlog
$(_BuildArgs)
installNodeJs: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -not -name 'Microsoft.AspNetCore.App.Runtime.*' -delete; fi
condition: always()
artifacts:
- name: Linux_arm_Packages
path: artifacts/packages/
@ -308,14 +296,10 @@ jobs:
buildArgs: --arch arm64
--no-build-nodejs
--no-build-java
/bl:artifacts/log/build.arm64.binlog
-p:OnlyPackPlatformSpecificPackages=true
-bl:artifacts/log/build.arm64.binlog
$(_BuildArgs)
installNodeJs: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -not -name 'Microsoft.AspNetCore.App.Runtime.*' -delete; fi
condition: always()
artifacts:
- name: Linux_arm64_Packages
path: artifacts/packages/
@ -345,14 +329,10 @@ jobs:
--os-name linux-musl
--no-build-nodejs
--no-build-java
/bl:artifacts/log/build.musl.binlog
-p:OnlyPackPlatformSpecificPackages=true
-bl:artifacts/log/build.musl.binlog
$(_BuildArgs)
installNodeJs: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -not -name 'Microsoft.AspNetCore.App.Runtime.*' -delete; fi
condition: always()
artifacts:
- name: Linux_musl_x64_Packages
path: artifacts/packages/
@ -382,14 +362,10 @@ jobs:
--os-name linux-musl
--no-build-nodejs
--no-build-java
/bl:artifacts/log/build.musl.binlog
-p:OnlyPackPlatformSpecificPackages=true
-bl:artifacts/log/build.musl.binlog
$(_BuildArgs)
installNodeJs: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -not -name 'Microsoft.AspNetCore.App.Runtime.*' -delete; fi
condition: always()
artifacts:
- name: Linux_musl_arm64_Packages
path: artifacts/packages/

Просмотреть файл

@ -1,6 +1,9 @@
<Project>
<PropertyGroup>
<!-- When OnlyPackPlatformSpecificPackages is set, only produce packages for projects which set RuntimeIdentifier. -->
<IsPackable Condition=" '$(OnlyPackPlatformSpecificPackages)' == 'true' AND '$(IsPackable)' != 'false' AND '$(RuntimeIdentifier)' == '' ">false</IsPackable>
<!--
By default, all projects which produce packages are not intended to ship to NuGet.org as a product package.
Packages which are intended to ship to NuGet.org must opt-in by setting this to true in the project file.

Просмотреть файл

@ -52,7 +52,6 @@
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Identity.UI" ProjectPath="$(RepoRoot)src\Identity\UI\src\Microsoft.AspNetCore.Identity.UI.csproj" RefProjectPath="$(RepoRoot)src\Identity\UI\ref\Microsoft.AspNetCore.Identity.UI.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Connections.Abstractions" ProjectPath="$(RepoRoot)src\Servers\Connections.Abstractions\src\Microsoft.AspNetCore.Connections.Abstractions.csproj" RefProjectPath="$(RepoRoot)src\Servers\Connections.Abstractions\ref\Microsoft.AspNetCore.Connections.Abstractions.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Server.HttpSys" ProjectPath="$(RepoRoot)src\Servers\HttpSys\src\Microsoft.AspNetCore.Server.HttpSys.csproj" RefProjectPath="$(RepoRoot)src\Servers\HttpSys\ref\Microsoft.AspNetCore.Server.HttpSys.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.ANCMSymbols" ProjectPath="$(RepoRoot)src\Servers\IIS\AspNetCoreModuleV2\Symbols\Microsoft.AspNetCore.ANCMSymbols.csproj" RefProjectPath="$(RepoRoot)src\Servers\IIS\AspNetCoreModuleV2\ref\Microsoft.AspNetCore.ANCMSymbols.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Server.IISIntegration" ProjectPath="$(RepoRoot)src\Servers\IIS\IISIntegration\src\Microsoft.AspNetCore.Server.IISIntegration.csproj" RefProjectPath="$(RepoRoot)src\Servers\IIS\IISIntegration\ref\Microsoft.AspNetCore.Server.IISIntegration.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Server.IIS" ProjectPath="$(RepoRoot)src\Servers\IIS\IIS\src\Microsoft.AspNetCore.Server.IIS.csproj" RefProjectPath="$(RepoRoot)src\Servers\IIS\IIS\ref\Microsoft.AspNetCore.Server.IIS.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Server.Kestrel.Core" ProjectPath="$(RepoRoot)src\Servers\Kestrel\Core\src\Microsoft.AspNetCore.Server.Kestrel.Core.csproj" RefProjectPath="$(RepoRoot)src\Servers\Kestrel\Core\ref\Microsoft.AspNetCore.Server.Kestrel.Core.csproj" />

Просмотреть файл

@ -11,9 +11,9 @@
<Target Name="_GetPackageVersionInfo" DependsOnTargets="$(GetPackageVersionDependsOn)"
Returns="@(_ProjectPathWithVersion)">
<ItemGroup>
<_ProjectPathWithVersion Include="$(MSBuildProjectFullPath)" Condition="'$(IsPackable)' == 'true'">
<_ProjectPathWithVersion Include="$(MSBuildProjectFullPath)">
<PackageId>$(PackageId)</PackageId>
<PackageVersion Condition="'$(PackageVersion)' != ''">$(PackageVersion)</PackageVersion>
<PackageVersion>$(PackageVersion)</PackageVersion>
<VersionVariableName>$(PackageId.Replace('.',''))PackageVersion</VersionVariableName>
</_ProjectPathWithVersion>
</ItemGroup>

Просмотреть файл

@ -52,7 +52,7 @@
<CopyOutputSymbolsToOutputDirectory>true</CopyOutputSymbolsToOutputDirectory>
</PropertyGroup>
<Target Name="PreCreateVsixContainer" BeforeTargets="GetVsixSourceItems">
<Target Name="PreCreateVsixContainer" BeforeTargets="GetVsixSourceItems" Condition="'$(IsPackable)' == 'true'">
<ItemGroup>
<_TemplatePackage Include="$(ArtifactsShippingPackagesDir)Microsoft.AspNetCore.Blazor.Templates.*.nupkg" />
</ItemGroup>
@ -97,7 +97,8 @@
<ProjectReference
Include="..\..\Templates\src\Microsoft.AspNetCore.Blazor.Templates.csproj"
ReferenceOutputAssembly="false"
Targets="Pack" />
Private="false"
Targets="Build;Pack" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -1,4 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<NuspecFile>Microsoft.AspNetCore.Blazor.Templates.nuspec</NuspecFile>
@ -6,6 +7,9 @@
<EnableDefaultItems>False</EnableDefaultItems>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<IncludeBuildOutput>False</IncludeBuildOutput>
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
<DebugType>none</DebugType>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<NoWarn>$(NoWarn);2008</NoWarn>
<Description>Templates for ASP.NET Core Blazor projects.</Description>
<PackageTags>aspnet;templates;blazor;spa</PackageTags>
@ -45,4 +49,8 @@
<Output TaskParameter="OutputPath" ItemName="Content" />
</GenerateFileFromTemplate>
</Target>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<!-- Override SDK targets. This project does not produce a .dll. -->
<Target Name="CoreCompile" />
<Target Name="GetTargetPath" />
</Project>

Просмотреть файл

@ -1,5 +1,5 @@
<Project>
<PropertyGroup Condition="'$(IsPackable)' == 'true'">
<PropertyGroup Condition="'$(IsUnitTestProject)' != 'true'">
<GenerateDocumentationFile Condition="'$(GenerateDocumentationFile)' == ''">true</GenerateDocumentationFile>
</PropertyGroup>

Просмотреть файл

@ -63,7 +63,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
<PropertyGroup>
<!-- If this project won't produce a package, don't bother building anything. -->
<BuildDependsOn Condition="'$(IsPackable)' != 'false'">
<BuildDependsOn Condition="'$(IsTargetingPackBuilding)' != 'false'">
$(BuildDependsOn);
GeneratePackageConflictManifest;
_ResolveTargetingPackContent;
@ -161,7 +161,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
<Target Name="_CreateTargetingPackArchive"
Inputs="@(RefPackContent)"
Outputs="$(ArchiveOutputPath)">
Outputs="$(ArchiveOutputPath)"
Condition="'$(IsPackable)' == 'true'">
<ZipDirectory
SourceDirectory="$(TargetingPackLayoutRoot)"
DestinationFile="$(ArchiveOutputPath)"

Просмотреть файл

@ -1,17 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="..\..\build\assets.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<PackageId>$(MSBuildProjectName).$(TargetRuntimeIdentifier)</PackageId>
<IncludeBuildOutput>true</IncludeBuildOutput>
<IsPackable>$(PackNativeAssets)</IsPackable>
<IsShippingPackage>false</IsShippingPackage>
<BuildOutputTargetFolder>runtimes/$(TargetRuntimeIdentifier)/native/</BuildOutputTargetFolder>
<RuntimeIdentifier>$(TargetRuntimeIdentifier)</RuntimeIdentifier>
<DebugType>none</DebugType>
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<HasReferenceAssembly>false</HasReferenceAssembly>
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>
<TargetsForTfmSpecificBuildOutput>
$(TargetsForTfmSpecificBuildOutput);
AddPackNativeComponents
</TargetsForTfmSpecificBuildOutput>
<PackageId>$(MSBuildProjectName).$(TargetRuntimeIdentifier)</PackageId>
</PropertyGroup>
<ItemGroup Condition="'$(BuildIisNativeProjects)' == 'true' AND '$(VCTargetsPath)' != ''">
@ -22,16 +29,17 @@
<Target Name="AddPackNativeComponents" AfterTargets="_CalculateInputsOutputsForPack" Condition="'$(BuildIisNativeProjects)' == 'true' AND '$(PackNativeAssets)' == 'true'">
<ItemGroup>
<!-- RunShimComponents is based on the current runtime (NativePlatform) which should be the same as TargetRuntimeIdentifier -->
<BuiltProjectOutputGroupOutput Remove="@(BuiltProjectOutputGroupOutput)" />
<DebugSymbolsProjectOutputGroupOutput Remove="@(DebugSymbolsProjectOutputGroupOutput)" />
<BuiltProjectOutputGroupOutput Include="%(RunShimComponents.DllLocation)" />
<BuiltProjectOutputGroupOutput Include="%(RunShimComponents.PdbLocation)" />
<NuGetPackInput Include="@(BuiltProjectOutputGroupOutput)" />
</ItemGroup>
</Target>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<!-- This project does not produce a binary. Disable the compiler. -->
<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
<Target Name="CoreCompile" />
<ItemGroup>
<BuiltProjectOutputGroupKeyOutput Remove="@(BuiltProjectOutputGroupKeyOutput)" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,10 +0,0 @@
<!-- This file is automatically generated. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<Compile Include="Microsoft.AspNetCore.ANCMSymbols.netcoreapp3.0.cs" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,3 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

Просмотреть файл

@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TrimmedVersion>$(VersionPrefix.Substring(0, $(VersionPrefix.LastIndexOf('.'))))</TrimmedVersion>
<title>ASP.NET Core Extensions</title>
<Description>This extension enables additional functionality for ASP.NET Core on Azure WebSites, such as enabling Azure logging.</Description>
<TargetFramework>net461</TargetFramework>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<PackageTags>aspnet;logging;aspnetcore;AzureSiteExtension;keyvault;configuration;dataprotection</PackageTags>
<ContentTargetFolders>content</ContentTargetFolders>
<PackageId>Microsoft.AspNetCore.AzureAppServices.SiteExtension.$(TrimmedVersion).$(TargetArchitecture)</PackageId>
<PackageId>Microsoft.AspNetCore.AzureAppServices.SiteExtension.$(AspNetCoreMajorMinorVersion).$(TargetArchitecture)</PackageId>
<RuntimeIdentifier>$(TargetRuntimeIdentifier)</RuntimeIdentifier>
<HostingStartupRuntimeFrameworkVersion>$(MicrosoftNETCoreAppPackageVersion)</HostingStartupRuntimeFrameworkVersion>
<TargetFramework>net461</TargetFramework>

Просмотреть файл

@ -5,11 +5,11 @@
<PackageType>AzureSiteExtension</PackageType>
<ContentTargetFolders>content</ContentTargetFolders>
<TrimmedVersion>$(VersionPrefix.Substring(0, $(VersionPrefix.LastIndexOf('.'))))</TrimmedVersion>
<Title>ASP.NET Core $(TrimmedVersion) ($(TargetArchitecture)) Runtime </Title>
<Title>ASP.NET Core $(AspNetCoreMajorMinorVersion) ($(TargetArchitecture)) Runtime </Title>
<Description>This site extension installs Microsoft.AspNetCore.App and Microsoft.NetCore.App shared runtimes.</Description>
<PackageTags>aspnetcore;AzureSiteExtension</PackageTags>
<PackageId>AspNetCoreRuntime.$(TrimmedVersion).$(TargetArchitecture)</PackageId>
<PackageId>AspNetCoreRuntime.$(AspNetCoreMajorMinorVersion).$(TargetArchitecture)</PackageId>
<RuntimeIdentifier>$(TargetRuntimeIdentifier)</RuntimeIdentifier>
<NoPackageAnalysis>true</NoPackageAnalysis>
<DotNetUnpackFolder>$(RedistSharedFrameworkLayoutRoot)</DotNetUnpackFolder>
<IsShippingPackage>true</IsShippingPackage>