Produce Toolset MSI NuPkgs for insertion into VS (#2359)

* Produce Toolset MSI NuPkgs for insertion into VS; stop producing SDK bundle NuPkgs.
This commit is contained in:
John Beisner 2019-06-10 16:00:53 -07:00 committed by GitHub
parent 5b42a95988
commit 1e7815b2dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 52 additions and 60 deletions

View file

@ -17,11 +17,11 @@
<SdkGenerateMsiPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatemsi.ps1</SdkGenerateMsiPowershellScript>
<SdkStableFileIdForApphostTransform>$(MSBuildThisFileDirectory)packaging/windows/clisdk/stablefileidforapphosttransform.xslt</SdkStableFileIdForApphostTransform>
<SdkGenerateBundlePowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatebundle.ps1</SdkGenerateBundlePowershellScript>
<SdkGenerateNupkgPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatenupkg.ps1</SdkGenerateNupkgPowershellScript>
<GenerateNupkgPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatenupkg.ps1</GenerateNupkgPowershellScript>
<SdkInstallerNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.$(Architecture).nuspec</SdkInstallerNuspecFile>
<SdkInstallerNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg</SdkInstallerNupkgFile>
<VSToolsNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Tools.Net.Core.SDK.$(Architecture).nuspec</VSToolsNuspecFile>
<ToolsetInstallerNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.Net.Core.Toolset.nuspec</ToolsetInstallerNuspecFile>
<ToolsetInstallerNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.Net.Core.Toolset.$(Architecture).$(FullNugetVersion).nupkg</ToolsetInstallerNupkgFile>
<VSToolsNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Tools.Net.Core.SDK.nuspec</VSToolsNuspecFile>
<VSToolsNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Tools.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg</VSToolsNupkgFile>
<SdkResolverLayoutPath>$(ArtifactsDir)bin/SdkResolver/$(Configuration)</SdkResolverLayoutPath>
@ -35,6 +35,7 @@
<PropertyGroup>
<SdkMSIInstallerFile>$(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkMSIInstallerFile>
<SdkMSICabFile>$(ArtifactsShippingPackagesDir)d$(Architecture)-1.cab</SdkMSICabFile>
<CombinedFrameworkSdkHostMSIInstallerFile>$(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostMSIInstallerFile>
<SdkBundleInstallerOutputGuidString>$(ProductBandCombinedHostHostFxrFrameworkSdkName)</SdkBundleInstallerOutputGuidString>
@ -158,45 +159,48 @@
-InformationAction Continue " />
</Target>
<Target Name="GenerateSdkNupkg"
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
<Target Name="GenerateToolsetNupkg"
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateSdkMsi;SignSdkMsi"
Condition=" '$(OS)' == 'Windows_NT'"
Inputs="$(CombinedFrameworkSdkHostMSIInstallerFile);
$(SdkInstallerNuspecFile);
$(SdkGenerateNupkgPowershellScript)"
Outputs="$(SdkInstallerNupkgFile)">
Inputs="$(SdkMSIInstallerFile);
$(ToolsetInstallerNuspecFile);
$(GenerateNupkgPowershellScript)"
Outputs="$(ToolsetInstallerNupkgFile)">
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript) ^
'$(CombinedFrameworkSdkHostMSIInstallerFile)' ^
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
'$(SdkMSIInstallerFile)' ^
'$(FullNugetVersion)' ^
'$(SdkInstallerNuspecFile)' ^
'$(SdkInstallerNupkgFile)'" />
'$(ToolsetInstallerNuspecFile)' ^
'$(ToolsetInstallerNupkgFile)' ^
'$(Architecture)' ^
'$(SdkMSICabFile)'" />
</Target>
<Target Name="GenerateVSToolsNupkg"
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs"
Condition=" '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x86'"
Inputs="$(RedistLayoutPath)/**/*;
$(VSToolsNuspecFile);
$(SdkGenerateNupkgPowershellScript)"
$(GenerateNupkgPowershellScript)"
Outputs="$(VSToolsNupkgFile)">
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript) ^
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
'$(RedistLayoutPath.TrimEnd('\'))' ^
'$(FullNugetVersion)' ^
'$(VSToolsNuspecFile)' ^
'$(VSToolsNupkgFile)'" />
'$(VSToolsNupkgFile)' ^
'$(Architecture)'" />
</Target>
<Target Name="GenerateVSToolsResolverNupkg"
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs"
Condition=" '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x86'"
Inputs="$(SdkResolverLayoutPath)/**/*;
$(VSToolsResolverNuspecFile);
$(SdkGenerateNupkgPowershellScript)"
$(GenerateNupkgPowershellScript)"
Outputs="$(VSToolsResolverNupkgFile)">
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript) ^
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
'$(SdkResolverLayoutPath.TrimEnd('\'))' ^
'$(FullNugetVersion)' ^
'$(VSToolsResolverNuspecFile)' ^
@ -204,17 +208,17 @@
</Target>
<Target Name="GenerateSdkMSBuildExtensionsNupkg"
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs"
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "
Inputs="$(MSBuildExtensionsLayoutDirectory)/**/*;
$(SdkInstallerNuspecFile);
$(SdkGenerateNupkgPowershellScript)"
$(SdkMSBuildExtensionsNuspecFile);
$(GenerateNupkgPowershellScript)"
Outputs="$(SdkMSBuildExtensionsNupkgFile);$(SdkMSBuildExtensionsSwrFile)">
<!-- Disabling this for now because we don't have the MSBuildExtensions available.
https://github.com/dotnet/cli/issues/10260 -->
<!-- <Exec Command="powershell -NoProfile -NoLogo -InformationAction Continue $(SdkGenerateNupkgPowershellScript) ^
<!-- <Exec Command="powershell -NoProfile -NoLogo -InformationAction Continue $(GenerateNupkgPowershellScript) ^
'$(MSBuildExtensionsLayoutDirectory)' ^
'$(FullNugetVersion)' ^
'$(SdkMSBuildExtensionsNuspecFile)' ^
@ -233,7 +237,7 @@
SignSdkMsi;
GenerateSdkBundle;
SignSdkBundle;
GenerateSdkNupkg;
GenerateToolsetNupkg;
GenerateVSToolsNupkg;
GenerateVSToolsResolverNupkg;
GenerateSdkMSBuildExtensionsNupkg"

View file

@ -9,10 +9,10 @@
<licenseUrl>https://www.microsoft.com/net/dotnet_library_license.htm</licenseUrl>
<projectUrl>https://github.com/dotnet/core-sdk</projectUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>MSBuild extensions bundled with .NET Core SDK insertions to VS</description>
<description>MSBuild extensions bundled with .NET Core SDK for internal Visual Studio build consumption</description>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
</metadata>
<files>
<file src="$DOTNET_BUNDLE$\**\*" />
<file src="$PAYLOAD_FILES$\**\*" />
</files>
</package>

View file

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>VS.Redist.Common.Net.Core.SDK.x86</id>
<version>1.0.0</version>
<title>VS.Redist.Common.Net.Core.SDK.x86</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>https://www.microsoft.com/net/dotnet_library_license.htm</licenseUrl>
<projectUrl>https://github.com/dotnet/core-sdk</projectUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>Windows Installer (x86) for .Net Core SDK</description>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
</metadata>
<files>
<file src="$DOTNET_BUNDLE$" />
</files>
</package>

View file

@ -1,18 +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.Net.Core.SDK.x64</id>
<id>VS.Redist.Common.Net.Core.Toolset.$ARCH$</id>
<version>1.0.0</version>
<title>VS.Redist.Common.Net.Core.SDK.x64</title>
<title>VS.Redist.Common.Net.Core.Toolset.$ARCH$</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>https://www.microsoft.com/net/dotnet_library_license.htm</licenseUrl>
<projectUrl>https://github.com/dotnet/core-sdk</projectUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>Windows Installers (x64) for .Net Core SDK</description>
<description>.NET Core SDK Toolset ($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="$DOTNET_BUNDLE$" />
<file src="$PAYLOAD_FILES$" />
<file src="$DOTNET_CAB_FILE$" />
</files>
</package>

View file

@ -9,11 +9,11 @@
<licenseUrl>https://www.microsoft.com/net/dotnet_library_license.htm</licenseUrl>
<projectUrl>https://github.com/dotnet/core-sdk</projectUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>.Net Core SDK MSBuild resolver for internal VS build consumption</description>
<description>.NET Core SDK MSBuild resolver as a .nupkg for internal Visual Studio build consumption</description>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
</metadata>
<files>
<file src="$DOTNET_BUNDLE$\**\*" target="v15.0\Bin\SdkResolvers\Microsoft.DotNet.MSBuildSdkResolver" />
<file src="$PAYLOAD_FILES$\**\*" target="v15.0\Bin\SdkResolvers\Microsoft.DotNet.MSBuildSdkResolver" />
<file src="VS.Tools.Net.Core.SDK.Resolver.cxspec" />
</files>
</package>

View file

@ -1,19 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>VS.Tools.Net.Core.SDK.x86</id>
<id>VS.Tools.Net.Core.SDK.$ARCH$</id>
<version>1.0.0</version>
<title>VS.Tools.Net.Core.SDK.x86</title>
<title>VS.Tools.Net.Core.SDK.$ARCH$</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>https://www.microsoft.com/net/dotnet_library_license.htm</licenseUrl>
<projectUrl>https://github.com/dotnet/core-sdk</projectUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>.Net Core SDK (x86) as a .nupkg for internal VS build consumption</description>
<description>.NET Core SDK ($ARCH$) as a .nupkg for internal Visual Studio build consumption</description>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
</metadata>
<files>
<file src="$DOTNET_BUNDLE$\**\*" />
<file src="$PAYLOAD_FILES$\**\*" />
<file src="Init.cmd" />
</files>
</package>

View file

@ -2,17 +2,22 @@
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
param(
[Parameter(Mandatory=$true)][string]$SdkBundlePath,
[Parameter(Mandatory=$true)][string]$ContentPath,
[Parameter(Mandatory=$true)][string]$NugetVersion,
[Parameter(Mandatory=$true)][string]$NuspecFile,
[Parameter(Mandatory=$true)][string]$NupkgFile
[Parameter(Mandatory=$true)][string]$NupkgFile,
[Parameter(Mandatory=$false)][string]$Architecture,
[Parameter(Mandatory=$false)][string]$CabPath
)
$RepoRoot = Convert-Path "$PSScriptRoot\..\..\..\..\..\.."
$NuGetDir = Join-Path $RepoRoot "artifacts\Tools\nuget"
$NuGetExe = Join-Path $NuGetDir "nuget.exe"
$OutputDirectory = [System.IO.Path]::GetDirectoryName($NupkgFile)
$SdkBundlePath = [System.IO.Path]::GetFullPath($SdkBundlePath)
$ContentPath = [System.IO.Path]::GetFullPath($ContentPath)
if ($CabPath) {
$CabPath = [System.IO.Path]::GetFullPath($CabPath)
}
if (-not (Test-Path $NuGetDir)) {
New-Item -ItemType Directory -Force -Path $NuGetDir | Out-Null
@ -28,5 +33,5 @@ if (Test-Path $NupkgFile) {
Remove-Item -Force $NupkgFile
}
& $NuGetExe pack $NuspecFile -Version $NugetVersion -OutputDirectory $OutputDirectory -NoDefaultExcludes -NoPackageAnalysis -Properties DOTNET_BUNDLE=$SdkBundlePath
& $NuGetExe pack $NuspecFile -Version $NugetVersion -OutputDirectory $OutputDirectory -NoDefaultExcludes -NoPackageAnalysis -Properties PAYLOAD_FILES=$ContentPath`;DOTNET_CAB_FILE=$CabPath`;ARCH=$Architecture
Exit $LastExitCode