Generate .nupkg files that contain aspnetcore-runtime MSI for insertion into Visual Studio (#11345)
This commit is contained in:
parent
2a31739302
commit
0274aceaee
|
|
@ -24,6 +24,8 @@
|
||||||
<FileExtensionSignInfo Include=".nupkg" CertificateName="NuGet" />
|
<FileExtensionSignInfo Include=".nupkg" CertificateName="NuGet" />
|
||||||
<FileExtensionSignInfo Include=".vsix" CertificateName="VsixSHA2" />
|
<FileExtensionSignInfo Include=".vsix" CertificateName="VsixSHA2" />
|
||||||
<FileExtensionSignInfo Include=".zip" CertificateName="None" />
|
<FileExtensionSignInfo Include=".zip" CertificateName="None" />
|
||||||
|
<FileExtensionSignInfo Include=".cab" CertificateName="None" />
|
||||||
|
<FileExtensionSignInfo Include=".msi" CertificateName="None" />
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Use the PublicKeyToken of .NET assemblies to determine with authenticode cert to use.
|
Use the PublicKeyToken of .NET assemblies to determine with authenticode cert to use.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||||
|
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
|
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory=$true)][string]$Name,
|
||||||
|
[Parameter(Mandatory=$true)][string]$MsiPath,
|
||||||
|
[Parameter(Mandatory=$false)][string]$CabPath,
|
||||||
|
[Parameter(Mandatory=$true)][string]$NuspecFile,
|
||||||
|
[Parameter(Mandatory=$true)][string]$OutputDirectory,
|
||||||
|
[Parameter(Mandatory=$true)][string]$Architecture,
|
||||||
|
[Parameter(Mandatory=$true)][string]$PackageVersion,
|
||||||
|
[Parameter(Mandatory=$true)][string]$RepoRoot,
|
||||||
|
[Parameter(Mandatory=$true)][string]$MajorVersion,
|
||||||
|
[Parameter(Mandatory=$true)][string]$MinorVersion
|
||||||
|
)
|
||||||
|
|
||||||
|
$NuGetDir = Join-Path $RepoRoot "artifacts\Tools\nuget\$Name\$Architecture"
|
||||||
|
$NuGetExe = Join-Path $NuGetDir "nuget.exe"
|
||||||
|
|
||||||
|
if (-not (Test-Path $NuGetDir)) {
|
||||||
|
New-Item -ItemType Directory -Force -Path $NuGetDir | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not (Test-Path $NuGetExe)) {
|
||||||
|
# Using 3.5.0 to workaround https://github.com/NuGet/Home/issues/5016
|
||||||
|
Write-Output "Downloading nuget.exe to $NuGetExe"
|
||||||
|
wget https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe -OutFile $NuGetExe
|
||||||
|
}
|
||||||
|
|
||||||
|
& $NuGetExe pack $NuspecFile -Version $PackageVersion -OutputDirectory $OutputDirectory -NoDefaultExcludes -NoPackageAnalysis -Properties ASPNETCORE_RUNTIME_MSI=$MsiPath`;ASPNETCORE_CAB_FILE=$CabPath`;ARCH=$Architecture`;MAJOR=MajorVersion`;MINOR=MinorVersion`;
|
||||||
|
Exit $LastExitCode
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
<DefineConstants>$(DefineConstants);AspNetCoreSharedFrameworkSource=$(HarvestSource)</DefineConstants>
|
<DefineConstants>$(DefineConstants);AspNetCoreSharedFrameworkSource=$(HarvestSource)</DefineConstants>
|
||||||
<NamespaceGuid>$(SharedFrameworkNamespaceGuid)</NamespaceGuid>
|
<NamespaceGuid>$(SharedFrameworkNamespaceGuid)</NamespaceGuid>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ToolsetInstallerNuspecFile>$(RepoRoot)\src\Installers\Windows\SharedFramework\SharedFrameworkPackage.nuspec</ToolsetInstallerNuspecFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
@ -79,4 +80,22 @@
|
||||||
<ProductName>Microsoft ASP.NET Core $(PackageBrandingVersion) Shared Framework ($(Platform))</ProductName>
|
<ProductName>Microsoft ASP.NET Core $(PackageBrandingVersion) Shared Framework ($(Platform))</ProductName>
|
||||||
<DefineConstants>$(DefineConstants);ProductName=$(ProductName)</DefineConstants>
|
<DefineConstants>$(DefineConstants);ProductName=$(ProductName)</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Target Name="CreateSharedFrameworkNugetPackage" AfterTargets="CopyToArtifactsDirectory;Build">
|
||||||
|
<PropertyGroup>
|
||||||
|
<MsiFullPath>$(InstallersOutputPath)$(PackageFileName)</MsiFullPath>
|
||||||
|
<CabFullPath>$(InstallersOutputPath)$(Cabinet)</CabFullPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
||||||
|
'$(ProductNameShort)' ^
|
||||||
|
'$(MsiFullPath)' ^
|
||||||
|
'$(CabFullPath)' ^
|
||||||
|
'$(ToolsetInstallerNuspecFile)' ^
|
||||||
|
'$(ArtifactsNonShippingPackagesDir)' ^
|
||||||
|
'$(Platform)' ^
|
||||||
|
'$(PackageVersion)' ^
|
||||||
|
'$(RepoRoot)' ^
|
||||||
|
'$(AspNetCoreMajorVersion)' ^
|
||||||
|
'$(AspNetCoreMinorVersion)'" />
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
|
<metadata>
|
||||||
|
<id> VS.Redist.Common.AspNetCore.SharedFramework.$ARCH$.$MAJOR$.$MINOR$</id>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<title> VS.Redist.Common.AspNetCore.SharedFramework.$ARCH$.$MAJOR$.$MINOR$</title>
|
||||||
|
<authors>Microsoft</authors>
|
||||||
|
<owners>Microsoft</owners>
|
||||||
|
<licenseUrl>https://www.microsoft.com/net/dotnet_library_license.htm</licenseUrl>
|
||||||
|
<projectUrl>https://github.com/aspnet/aspnetcore</projectUrl>
|
||||||
|
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||||
|
<description>$MAJOR$.$MINOR$ ASP.NET Core TargetingPack ($ARCH$) Windows Installer MSI as a .nupkg for internal Visual Studio build consumption</description>
|
||||||
|
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
|
||||||
|
</metadata>
|
||||||
|
<files>
|
||||||
|
<file src="$ASPNETCORE_RUNTIME_MSI$" />
|
||||||
|
<file src="$ASPNETCORE_CAB_FILE$" />
|
||||||
|
</files>
|
||||||
|
</package>
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
<DefineConstants>$(DefineConstants);AspNetCoreTargetingPackSource=$(HarvestSource)</DefineConstants>
|
<DefineConstants>$(DefineConstants);AspNetCoreTargetingPackSource=$(HarvestSource)</DefineConstants>
|
||||||
<NamespaceGuid>DDBB771F-963F-47D3-8510-9ABD04DBE1D1</NamespaceGuid>
|
<NamespaceGuid>DDBB771F-963F-47D3-8510-9ABD04DBE1D1</NamespaceGuid>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ToolsetInstallerNuspecFile>$(RepoRoot)\src\Installers\Windows\TargetingPack\TargetingPackPackage.nuspec</ToolsetInstallerNuspecFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
@ -75,4 +76,21 @@
|
||||||
<!-- Suppresses building this project completely during servicing builds. -->
|
<!-- Suppresses building this project completely during servicing builds. -->
|
||||||
<BuildDependsOn Condition="'$(IsTargetingPackBuilding)' == 'false'" />
|
<BuildDependsOn Condition="'$(IsTargetingPackBuilding)' == 'false'" />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Target Name="CreateTargetingPackNugetPackage" AfterTargets="CopyToArtifactsDirectory;Build">
|
||||||
|
<PropertyGroup>
|
||||||
|
<MsiFullPath>$(InstallersOutputPath)$(PackageFileName)</MsiFullPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
||||||
|
'$(ProductNameShort)' ^
|
||||||
|
'$(MsiFullPath)' ^
|
||||||
|
'$(CabFullPath)' ^
|
||||||
|
'$(ToolsetInstallerNuspecFile)' ^
|
||||||
|
'$(ArtifactsNonShippingPackagesDir)' ^
|
||||||
|
'$(Platform)' ^
|
||||||
|
'$(PackageVersion)' ^
|
||||||
|
'$(RepoRoot)' ^
|
||||||
|
'$(AspNetCoreMajorVersion)' ^
|
||||||
|
'$(AspNetCoreMinorVersion)'" />
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
|
<metadata>
|
||||||
|
<id>VS.Redist.Common.AspNetCore.TargetingPack.$ARCH$.$MAJOR$.$MINOR$</id>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<title> VS.Redist.Common.AspNetCore.TargetingPack.$ARCH$.$MAJOR$.$MINOR$</title>
|
||||||
|
<authors>Microsoft</authors>
|
||||||
|
<owners>Microsoft</owners>
|
||||||
|
<licenseUrl>https://www.microsoft.com/net/dotnet_library_license.htm</licenseUrl>
|
||||||
|
<projectUrl>https://github.com/aspnet/aspnetcore</projectUrl>
|
||||||
|
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||||
|
<description>$MAJOR$.$MINOR$ ASP.NET Core TargetingPack ($ARCH$) Windows Installer MSI as a .nupkg for internal Visual Studio build consumption</description>
|
||||||
|
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
|
||||||
|
</metadata>
|
||||||
|
<files>
|
||||||
|
<file src="$ASPNETCORE_RUNTIME_MSI$" />
|
||||||
|
</files>
|
||||||
|
</package>
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<DefineConstants>$(DefineConstants);files=$(MSBuildThisFileDirectory)files</DefineConstants>
|
<DefineConstants>$(DefineConstants);files=$(MSBuildThisFileDirectory)files</DefineConstants>
|
||||||
<DefineConstants>$(DefineConstants);Culture=$(Cultures)</DefineConstants>
|
<DefineConstants>$(DefineConstants);Culture=$(Cultures)</DefineConstants>
|
||||||
|
<GenerateNupkgPowershellScript>$(RepoRoot)\src\Installers\Windows\GenerateNugetPackageWithMsi.ps1</GenerateNupkgPowershellScript>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue