From 010fdeac8e616866ee8fa6bb69b0378d80b266ba Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Tue, 16 Jul 2019 08:26:29 -0700 Subject: [PATCH 1/4] 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 0000000000..1b86aed1c4 --- /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 5dd1ce6809..0abe1a3242 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 0000000000..b5b8c43d9e --- /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 f2737edad2..844b72896c 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 fd5517f3017cd64056dc6224ce3685f0245071a0 Mon Sep 17 00:00:00 2001 From: Andrew Stanton-Nurse Date: Mon, 22 Jul 2019 09:20:40 -0700 Subject: [PATCH 2/4] Be more defensive in BufferingDisabled test (#12278) Fixes https://github.com/aspnet/AspNetCore-Internal/issues/2826 We [use `?.` in `master`](https://github.com/aspnet/AspNetCore/blob/f56cb72b7fa01ea09c3d3b128aaeb9cee937b371/src/Hosting/Server.IntegrationTesting/src/Deployers/ApplicationDeployer.cs#L103) and it seems like the test can end up in this state (by the linked issue) so back-porting that defensive measure seems reasonable. --- .../src/Deployers/ApplicationDeployer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Hosting/Server.IntegrationTesting/src/Deployers/ApplicationDeployer.cs b/src/Hosting/Server.IntegrationTesting/src/Deployers/ApplicationDeployer.cs index 5e1457e70f..5fcfe30907 100644 --- a/src/Hosting/Server.IntegrationTesting/src/Deployers/ApplicationDeployer.cs +++ b/src/Hosting/Server.IntegrationTesting/src/Deployers/ApplicationDeployer.cs @@ -97,7 +97,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting } else { - _publishedApplication.Dispose(); + _publishedApplication?.Dispose(); } } } From 9a6d4af9d6ddc81eb61b566b26ee58484c02c61d Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Wed, 24 Jul 2019 18:01:57 -0700 Subject: [PATCH 3/4] Merge release/2.1 into release/2.2 (#12290) --- .../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 0000000000..1b86aed1c4 --- /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 5dd1ce6809..0abe1a3242 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 0000000000..b5b8c43d9e --- /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 f2737edad2..844b72896c 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 4/4] 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 e51a66c3f8..67b8630337 100644 --- a/build/artifacts.props +++ b/build/artifacts.props @@ -142,10 +142,10 @@ - - - - + + + +