From 010fdeac8e616866ee8fa6bb69b0378d80b266ba Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Tue, 16 Jul 2019 08:26:29 -0700 Subject: [PATCH 1/2] Generate VS nuget package for 2.1 (#11616) --- .../Windows/GenerateNugetPackageWithMsi.ps1 | 31 +++++++++++++++++++ .../SharedFramework/SharedFramework.wixproj | 20 ++++++++++++ .../SharedFrameworkPackage.nuspec | 19 ++++++++++++ src/Installers/Windows/Wix.props | 1 + 4 files changed, 71 insertions(+) create mode 100644 src/Installers/Windows/GenerateNugetPackageWithMsi.ps1 create mode 100644 src/Installers/Windows/SharedFramework/SharedFrameworkPackage.nuspec diff --git a/src/Installers/Windows/GenerateNugetPackageWithMsi.ps1 b/src/Installers/Windows/GenerateNugetPackageWithMsi.ps1 new file mode 100644 index 000000000000..1b86aed1c447 --- /dev/null +++ b/src/Installers/Windows/GenerateNugetPackageWithMsi.ps1 @@ -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 "obj\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 \ No newline at end of file diff --git a/src/Installers/Windows/SharedFramework/SharedFramework.wixproj b/src/Installers/Windows/SharedFramework/SharedFramework.wixproj index 5dd1ce6809e2..0abe1a324287 100644 --- a/src/Installers/Windows/SharedFramework/SharedFramework.wixproj +++ b/src/Installers/Windows/SharedFramework/SharedFramework.wixproj @@ -17,6 +17,8 @@ $(SharedFrameworkHarvestRootPath)\$(Platform)\ $(DefineConstants);AspNetCoreSharedFrameworkSource=$(HarvestSource) $(SharedFrameworkNamespaceGuid) + $(RepositoryRoot)\src\Installers\Windows\SharedFramework\SharedFrameworkPackage.nuspec + $(RepositoryRoot)artifacts/bin/$(Configuration)/installers/ @@ -47,5 +49,23 @@ + + + $(InstallersOutputPath)en-US/$(TargetFileName) + $(InstallersOutputPath)en-US/$(Cabinet) + + + + diff --git a/src/Installers/Windows/SharedFramework/SharedFrameworkPackage.nuspec b/src/Installers/Windows/SharedFramework/SharedFrameworkPackage.nuspec new file mode 100644 index 000000000000..b5b8c43d9e97 --- /dev/null +++ b/src/Installers/Windows/SharedFramework/SharedFrameworkPackage.nuspec @@ -0,0 +1,19 @@ + + + + VS.Redist.Common.AspNetCore.SharedFramework.$ARCH$.$MAJOR$.$MINOR$ + 1.0.0 + VS.Redist.Common.AspNetCore.SharedFramework.$ARCH$.$MAJOR$.$MINOR$ + Microsoft + Microsoft + https://www.microsoft.com/net/dotnet_library_license.htm + https://github.com/aspnet/aspnetcore + true + $MAJOR$.$MINOR$ ASP.NET Core TargetingPack ($ARCH$) Windows Installer MSI as a .nupkg for internal Visual Studio build consumption + © Microsoft Corporation. All rights reserved. + + + + + + diff --git a/src/Installers/Windows/Wix.props b/src/Installers/Windows/Wix.props index f2737edad203..844b72896c01 100644 --- a/src/Installers/Windows/Wix.props +++ b/src/Installers/Windows/Wix.props @@ -32,6 +32,7 @@ $(DefineConstants);MajorVersion=$(AspNetCoreMajorVersion) $(DefineConstants);MinorVersion=$(AspNetCoreMinorVersion) $(DefineConstants);PackageVersion=$(PackageVersion) + $(RepositoryRoot)\src\Installers\Windows\GenerateNugetPackageWithMsi.ps1 From f7a7c98e53c5b8c803a0eaf1dbd1ab20287afa32 Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 24 Jul 2019 20:36:52 -0700 Subject: [PATCH 2/2] Ship templates in 2.1 (#12540) Addresses https://github.com/aspnet/AspNetCore/issues/12208 --- build/artifacts.props | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/artifacts.props b/build/artifacts.props index e51a66c3f875..67b86303377c 100644 --- a/build/artifacts.props +++ b/build/artifacts.props @@ -142,10 +142,10 @@ - - - - + + + +