Skip to content

Commit cb0211d

Browse files
committed
Merge in 'release/2.2' changes
2 parents f5a4153 + 9a6d4af commit cb0211d

File tree

4 files changed

+71
-0
lines changed

4 files changed

+71
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright (c) .NET Foundation and contributors. All rights reserved.
2+
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
4+
param(
5+
[Parameter(Mandatory=$true)][string]$Name,
6+
[Parameter(Mandatory=$true)][string]$MsiPath,
7+
[Parameter(Mandatory=$false)][string]$CabPath,
8+
[Parameter(Mandatory=$true)][string]$NuspecFile,
9+
[Parameter(Mandatory=$true)][string]$OutputDirectory,
10+
[Parameter(Mandatory=$true)][string]$Architecture,
11+
[Parameter(Mandatory=$true)][string]$PackageVersion,
12+
[Parameter(Mandatory=$true)][string]$RepoRoot,
13+
[Parameter(Mandatory=$true)][string]$MajorVersion,
14+
[Parameter(Mandatory=$true)][string]$MinorVersion
15+
)
16+
17+
$NuGetDir = Join-Path $RepoRoot "obj\Tools\nuget\$Name\$Architecture"
18+
$NuGetExe = Join-Path $NuGetDir "nuget.exe"
19+
20+
if (-not (Test-Path $NuGetDir)) {
21+
New-Item -ItemType Directory -Force -Path $NuGetDir | Out-Null
22+
}
23+
24+
if (-not (Test-Path $NuGetExe)) {
25+
# Using 3.5.0 to workaround https://github.com/NuGet/Home/issues/5016
26+
Write-Output "Downloading nuget.exe to $NuGetExe"
27+
wget https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe -OutFile $NuGetExe
28+
}
29+
30+
& $NuGetExe pack $NuspecFile -Version $PackageVersion -OutputDirectory $OutputDirectory -NoDefaultExcludes -NoPackageAnalysis -Properties ASPNETCORE_RUNTIME_MSI=$MsiPath`;ASPNETCORE_CAB_FILE=$CabPath`;ARCH=$Architecture`;MAJOR=$MajorVersion`;MINOR=$MinorVersion`;
31+
Exit $LastExitCode

src/Installers/Windows/SharedFramework/SharedFramework.wixproj

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
<HarvestSource>$(SharedFrameworkHarvestRootPath)\$(Platform)\</HarvestSource>
1818
<DefineConstants>$(DefineConstants);AspNetCoreSharedFrameworkSource=$(HarvestSource)</DefineConstants>
1919
<NamespaceGuid>$(SharedFrameworkNamespaceGuid)</NamespaceGuid>
20+
<ToolsetInstallerNuspecFile>$(RepositoryRoot)\src\Installers\Windows\SharedFramework\SharedFrameworkPackage.nuspec</ToolsetInstallerNuspecFile>
21+
<InstallersOutputPath>$(RepositoryRoot)artifacts/bin/$(Configuration)/installers/</InstallersOutputPath>
2022
</PropertyGroup>
2123

2224
<ItemGroup>
@@ -47,5 +49,23 @@
4749
</HarvestDirectory>
4850
</ItemGroup>
4951

52+
<Target Name="CreateSharedFrameworkNugetPackage" AfterTargets="CopyToArtifactsDirectory;Build">
53+
<PropertyGroup>
54+
<MsiFullPath>$(InstallersOutputPath)en-US/$(TargetFileName)</MsiFullPath>
55+
<CabFullPath>$(InstallersOutputPath)en-US/$(Cabinet)</CabFullPath>
56+
</PropertyGroup>
57+
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
58+
'$(ProductNameShort)' ^
59+
'$(MsiFullPath)' ^
60+
'$(CabFullPath)' ^
61+
'$(ToolsetInstallerNuspecFile)' ^
62+
'$(InstallersOutputPath)' ^
63+
'$(Platform)' ^
64+
'$(PackageVersion)' ^
65+
'$(RepositoryRoot)' ^
66+
'$(AspNetCoreMajorVersion)' ^
67+
'$(AspNetCoreMinorVersion)'" />
68+
</Target>
69+
5070
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
5171
</Project>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
3+
<metadata>
4+
<id>VS.Redist.Common.AspNetCore.SharedFramework.$ARCH$.$MAJOR$.$MINOR$</id>
5+
<version>1.0.0</version>
6+
<title>VS.Redist.Common.AspNetCore.SharedFramework.$ARCH$.$MAJOR$.$MINOR$</title>
7+
<authors>Microsoft</authors>
8+
<owners>Microsoft</owners>
9+
<licenseUrl>https://www.microsoft.com/net/dotnet_library_license.htm</licenseUrl>
10+
<projectUrl>https://github.com/aspnet/aspnetcore</projectUrl>
11+
<requireLicenseAcceptance>true</requireLicenseAcceptance>
12+
<description>$MAJOR$.$MINOR$ ASP.NET Core TargetingPack ($ARCH$) Windows Installer MSI as a .nupkg for internal Visual Studio build consumption</description>
13+
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
14+
</metadata>
15+
<files>
16+
<file src="$ASPNETCORE_RUNTIME_MSI$" />
17+
<file src="$ASPNETCORE_CAB_FILE$" />
18+
</files>
19+
</package>

src/Installers/Windows/Wix.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<DefineConstants>$(DefineConstants);MajorVersion=$(AspNetCoreMajorVersion)</DefineConstants>
3333
<DefineConstants>$(DefineConstants);MinorVersion=$(AspNetCoreMinorVersion)</DefineConstants>
3434
<DefineConstants>$(DefineConstants);PackageVersion=$(PackageVersion)</DefineConstants>
35+
<GenerateNupkgPowershellScript>$(RepositoryRoot)\src\Installers\Windows\GenerateNugetPackageWithMsi.ps1</GenerateNupkgPowershellScript>
3536
</PropertyGroup>
3637

3738
</Project>

0 commit comments

Comments
 (0)