Introducing a SDK ARP Placeholder for Visual Studio

This commit is contained in:
jbeisner 2019-08-16 18:56:20 +00:00
parent 3cfc15c666
commit e367a32ce4
10 changed files with 253 additions and 2 deletions

View file

@ -15,12 +15,15 @@
<CombinedFrameworkSdkHostBundleEngineName>$(ArtifactsTmpDir)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)-engine.exe</CombinedFrameworkSdkHostBundleEngineName> <CombinedFrameworkSdkHostBundleEngineName>$(ArtifactsTmpDir)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)-engine.exe</CombinedFrameworkSdkHostBundleEngineName>
<SdkGenerateMsiPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatemsi.ps1</SdkGenerateMsiPowershellScript> <SdkGenerateMsiPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatemsi.ps1</SdkGenerateMsiPowershellScript>
<SdkPlaceholderGenerateMsiPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatesdkplaceholdermsi.ps1</SdkPlaceholderGenerateMsiPowershellScript>
<SdkStableFileIdForApphostTransform>$(MSBuildThisFileDirectory)packaging/windows/clisdk/stablefileidforapphosttransform.xslt</SdkStableFileIdForApphostTransform> <SdkStableFileIdForApphostTransform>$(MSBuildThisFileDirectory)packaging/windows/clisdk/stablefileidforapphosttransform.xslt</SdkStableFileIdForApphostTransform>
<SdkGenerateBundlePowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatebundle.ps1</SdkGenerateBundlePowershellScript> <SdkGenerateBundlePowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatebundle.ps1</SdkGenerateBundlePowershellScript>
<GenerateNupkgPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatenupkg.ps1</GenerateNupkgPowershellScript> <GenerateNupkgPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatenupkg.ps1</GenerateNupkgPowershellScript>
<ToolsetInstallerNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.NetCore.Toolset.nuspec</ToolsetInstallerNuspecFile> <ToolsetInstallerNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.NetCore.Toolset.nuspec</ToolsetInstallerNuspecFile>
<ToolsetInstallerNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.NetCore.Toolset.$(Architecture).$(FullNugetVersion).nupkg</ToolsetInstallerNupkgFile> <ToolsetInstallerNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.NetCore.Toolset.$(Architecture).$(FullNugetVersion).nupkg</ToolsetInstallerNupkgFile>
<SdkPlaceholderInstallerNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.NetCore.SdkPlaceholder.nuspec</SdkPlaceholderInstallerNuspecFile>
<SdkPlaceholderInstallerNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.NetCore.SdkPlaceholder.$(Architecture).$(FullNugetVersion).nupkg</SdkPlaceholderInstallerNupkgFile>
<VSToolsNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Tools.Net.Core.SDK.nuspec</VSToolsNuspecFile> <VSToolsNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Tools.Net.Core.SDK.nuspec</VSToolsNuspecFile>
<VSToolsNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Tools.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg</VSToolsNupkgFile> <VSToolsNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Tools.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg</VSToolsNupkgFile>
@ -36,9 +39,12 @@
<PropertyGroup> <PropertyGroup>
<SdkMSIInstallerFile>$(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkMSIInstallerFile> <SdkMSIInstallerFile>$(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkMSIInstallerFile>
<SdkMSICabFile>$(ArtifactsShippingPackagesDir)d$(Architecture)-1.cab</SdkMSICabFile> <SdkMSICabFile>$(ArtifactsShippingPackagesDir)d$(Architecture)-1.cab</SdkMSICabFile>
<SdkDependencyKeyPrefix>Dotnet_CLI</SdkDependencyKeyPrefix>
<Templates30MSIInstallerFile>$(ArtifactsShippingPackagesDir)dotnet-30templates-$(FullNugetVersion)-$(ProductMonikerRid)$(InstallerExtension)</Templates30MSIInstallerFile> <Templates30MSIInstallerFile>$(ArtifactsShippingPackagesDir)dotnet-30templates-$(FullNugetVersion)-$(ProductMonikerRid)$(InstallerExtension)</Templates30MSIInstallerFile>
<Templates22MSIInstallerFile>$(ArtifactsShippingPackagesDir)dotnet-22templates-$(FullNugetVersion)-$(ProductMonikerRid)$(InstallerExtension)</Templates22MSIInstallerFile> <Templates22MSIInstallerFile>$(ArtifactsShippingPackagesDir)dotnet-22templates-$(FullNugetVersion)-$(ProductMonikerRid)$(InstallerExtension)</Templates22MSIInstallerFile>
<Templates21MSIInstallerFile>$(ArtifactsShippingPackagesDir)dotnet-21templates-$(FullNugetVersion)-$(ProductMonikerRid)$(InstallerExtension)</Templates21MSIInstallerFile> <Templates21MSIInstallerFile>$(ArtifactsShippingPackagesDir)dotnet-21templates-$(FullNugetVersion)-$(ProductMonikerRid)$(InstallerExtension)</Templates21MSIInstallerFile>
<SdkPlaceholderMSIInstallerFile>$(ArtifactsShippingPackagesDir)dotnet-sdkplaceholder-$(FullNugetVersion)-$(ProductMonikerRid)$(InstallerExtension)</SdkPlaceholderMSIInstallerFile>
<SdkPlaceholderDependencyKeyPrefix>NetCore_SdkPlaceholder</SdkPlaceholderDependencyKeyPrefix>
<CombinedFrameworkSdkHostMSIInstallerFile>$(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostMSIInstallerFile> <CombinedFrameworkSdkHostMSIInstallerFile>$(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostMSIInstallerFile>
<SdkBundleInstallerOutputGuidString>$(ProductBandCombinedHostHostFxrFrameworkSdkName)</SdkBundleInstallerOutputGuidString> <SdkBundleInstallerOutputGuidString>$(ProductBandCombinedHostHostFxrFrameworkSdkName)</SdkBundleInstallerOutputGuidString>
@ -54,7 +60,7 @@
DependsOnTargets="GenerateLayout;SetupWixProperties;GetCoreSdkGitCommitInfo"> DependsOnTargets="GenerateLayout;SetupWixProperties;GetCoreSdkGitCommitInfo">
<!-- Consumed By Publish --> <!-- Consumed By Publish -->
<ItemGroup> <ItemGroup>
<GeneratedInstallers Include="$(SdkMSIInstallerFile);$(Templates30MSIInstallerFile);$(Templates22MSIInstallerFile);$(Templates21MSIInstallerFile);$(CombinedFrameworkSdkHostMSIInstallerFile)" /> <GeneratedInstallers Include="$(SdkMSIInstallerFile);$(Templates30MSIInstallerFile);$(Templates22MSIInstallerFile);$(Templates21MSIInstallerFile);$(CombinedFrameworkSdkHostMSIInstallerFile);$(SdkPlaceholderMSIInstallerFile)" />
</ItemGroup> </ItemGroup>
<GenerateMsiVersion CommitCount="$(GitCommitCount)" <GenerateMsiVersion CommitCount="$(GitCommitCount)"
@ -84,6 +90,11 @@
PropertyName="Templates21InstallerUpgradeCode" /> PropertyName="Templates21InstallerUpgradeCode" />
</GenerateGuidFromName> </GenerateGuidFromName>
<GenerateGuidFromName Name="$(SdkPlaceholderMSIInstallerFile)">
<Output TaskParameter="OutputGuid"
PropertyName="SdkPlaceholderInstallerUpgradeCode" />
</GenerateGuidFromName>
<GenerateGuidFromName Name="$(SdkBundleInstallerOutputGuidString)"> <GenerateGuidFromName Name="$(SdkBundleInstallerOutputGuidString)">
<Output TaskParameter="OutputGuid" <Output TaskParameter="OutputGuid"
PropertyName="CombinedFrameworkSDKHostInstallerUpgradeCode" /> PropertyName="CombinedFrameworkSDKHostInstallerUpgradeCode" />
@ -130,11 +141,31 @@
'$(SDKBundleVersion)' ^ '$(SDKBundleVersion)' ^
'$(NugetVersion)' ^ '$(NugetVersion)' ^
'$(SdkInstallerUpgradeCode)' ^ '$(SdkInstallerUpgradeCode)' ^
'$(SdkDependencyKeyPrefix)' ^
'$(Architecture)' ^ '$(Architecture)' ^
'$(SdkStableFileIdForApphostTransform)' ^ '$(SdkStableFileIdForApphostTransform)' ^
-InformationAction Continue" /> -InformationAction Continue" />
</Target> </Target>
<Target Name="GenerateSdkPlaceholderMsi"
DependsOnTargets="AcquireWix;MsiTargetsSetupInputOutputs"
Condition=" '$(OS)' == 'Windows_NT' "
Inputs="$(SdkPlaceholderGenerateMsiPowershellScript)"
Outputs="$(SdkPlaceholderMSIInstallerFile)">
<Exec Command="powershell -NoProfile -NoLogo $(SdkPlaceholderGenerateMsiPowershellScript) ^
'$(SdkPlaceholderMSIInstallerFile)' ^
'$(WixRoot)' ^
'$(SdkBrandName)' ^
'$(MsiVersion)' ^
'$(SDKBundleVersion)' ^
'$(NugetVersion)' ^
'$(SdkPlaceholderInstallerUpgradeCode)' ^
'$(SdkPlaceholderDependencyKeyPrefix)' ^
'$(Architecture)' ^
-InformationAction Continue" />
</Target>
<Target Name="GenerateTemplatesMsis" <Target Name="GenerateTemplatesMsis"
DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;SetSdkBrandingInfo;SetupTemplatesMsis" DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;SetSdkBrandingInfo;SetupTemplatesMsis"
Condition="$(ProductMonikerRid.StartsWith('win')) And !$(Architecture.StartsWith('arm'))" Condition="$(ProductMonikerRid.StartsWith('win')) And !$(Architecture.StartsWith('arm'))"
@ -151,6 +182,7 @@
'@(TemplatesMsiComponent->'%(MsiVersion)')' ^ '@(TemplatesMsiComponent->'%(MsiVersion)')' ^
'$(FullNugetVersion)' ^ '$(FullNugetVersion)' ^
'@(TemplatesMsiComponent->'%(UpgradeCode)')' ^ '@(TemplatesMsiComponent->'%(UpgradeCode)')' ^
'@(TemplatesMsiComponent->'%(DependencyKeyPrefix)')' ^
'$(Architecture)' ^ '$(Architecture)' ^
-InformationAction Continue" /> -InformationAction Continue" />
</Target> </Target>
@ -167,6 +199,7 @@
<BrandName>$(BundledTemplates30BrandName)</BrandName> <BrandName>$(BundledTemplates30BrandName)</BrandName>
<MsiVersion>$(BundledTemplates30MsiVersion)</MsiVersion> <MsiVersion>$(BundledTemplates30MsiVersion)</MsiVersion>
<UpgradeCode>$(Templates30InstallerUpgradeCode)</UpgradeCode> <UpgradeCode>$(Templates30InstallerUpgradeCode)</UpgradeCode>
<DependencyKeyPrefix>NetCore_Templates_3.0</DependencyKeyPrefix>
</TemplatesMsiComponent> </TemplatesMsiComponent>
<TemplatesMsiComponent Include="NetCore22TemplatesMsi"> <TemplatesMsiComponent Include="NetCore22TemplatesMsi">
<LayoutPath>$(Templates22LayoutPath.TrimEnd('\'))</LayoutPath> <LayoutPath>$(Templates22LayoutPath.TrimEnd('\'))</LayoutPath>
@ -174,6 +207,7 @@
<BrandName>$(BundledTemplates22BrandName)</BrandName> <BrandName>$(BundledTemplates22BrandName)</BrandName>
<MsiVersion>$(BundledTemplates22MsiVersion)</MsiVersion> <MsiVersion>$(BundledTemplates22MsiVersion)</MsiVersion>
<UpgradeCode>$(Templates22InstallerUpgradeCode)</UpgradeCode> <UpgradeCode>$(Templates22InstallerUpgradeCode)</UpgradeCode>
<DependencyKeyPrefix>NetCore_Templates_2.2</DependencyKeyPrefix>
</TemplatesMsiComponent> </TemplatesMsiComponent>
<TemplatesMsiComponent Include="NetCore21TemplatesMsi"> <TemplatesMsiComponent Include="NetCore21TemplatesMsi">
<LayoutPath>$(Templates21LayoutPath.TrimEnd('\'))</LayoutPath> <LayoutPath>$(Templates21LayoutPath.TrimEnd('\'))</LayoutPath>
@ -181,6 +215,7 @@
<BrandName>$(BundledTemplates21BrandName)</BrandName> <BrandName>$(BundledTemplates21BrandName)</BrandName>
<MsiVersion>$(BundledTemplates21MsiVersion)</MsiVersion> <MsiVersion>$(BundledTemplates21MsiVersion)</MsiVersion>
<UpgradeCode>$(Templates21InstallerUpgradeCode)</UpgradeCode> <UpgradeCode>$(Templates21InstallerUpgradeCode)</UpgradeCode>
<DependencyKeyPrefix>NetCore_Templates_2.1</DependencyKeyPrefix>
</TemplatesMsiComponent> </TemplatesMsiComponent>
</ItemGroup> </ItemGroup>
</Target> </Target>
@ -216,6 +251,7 @@
'$(NugetVersion)' ^ '$(NugetVersion)' ^
'$(MicrosoftWindowsDesktopPackageVersion)' ^ '$(MicrosoftWindowsDesktopPackageVersion)' ^
'$(CombinedFrameworkSDKHostInstallerUpgradeCode)' ^ '$(CombinedFrameworkSDKHostInstallerUpgradeCode)' ^
'$(SdkDependencyKeyPrefix)' ^
'$(Architecture)' ^ '$(Architecture)' ^
'$(MicrosoftNETCoreAppPackageVersion)' ^ '$(MicrosoftNETCoreAppPackageVersion)' ^
'$(AspNetCoreVersion)' ^ '$(AspNetCoreVersion)' ^
@ -242,6 +278,24 @@
'$(SdkMSICabFile)'" /> '$(SdkMSICabFile)'" />
</Target> </Target>
<Target Name="GenerateSdkPlaceholderNupkg"
DependsOnTargets="MsiTargetsSetupInputOutputs;GenerateSdkPlaceholderMsi;SignSdkPlaceholderMsi"
Condition=" '$(OS)' == 'Windows_NT' "
Inputs="$(SdkPlaceholderMSIInstallerFile);
$(SdkPlaceholderInstallerNuspecFile);
$(GenerateNupkgPowershellScript)"
Outputs="$(SdkPlaceholderInstallerNupkgFile)">
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
'$(ArtifactsDir)' ^
'$(SdkPlaceholderMSIInstallerFile)' ^
'$(FullNugetVersion)' ^
'$(SdkPlaceholderInstallerNuspecFile)' ^
'$(SdkPlaceholderInstallerNupkgFile)' ^
'$(Architecture)' ^
'$(MajorMinorVersion)'" />
</Target>
<Target Name="GenerateTemplatesNupkgs" <Target Name="GenerateTemplatesNupkgs"
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateTemplatesMsis;SignTemplatesMsis;SetupTemplatesNupkgs" DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateTemplatesMsis;SignTemplatesMsis;SetupTemplatesNupkgs"
Condition="$(ProductMonikerRid.StartsWith('win')) And !$(Architecture.StartsWith('arm'))" Condition="$(ProductMonikerRid.StartsWith('win')) And !$(Architecture.StartsWith('arm'))"
@ -347,8 +401,11 @@
SignTemplatesMsis; SignTemplatesMsis;
GenerateSdkBundle; GenerateSdkBundle;
SignSdkBundle; SignSdkBundle;
GenerateSdkPlaceholderMsi;
SignSdkPlaceholderMsi;
GenerateToolsetNupkg; GenerateToolsetNupkg;
GenerateTemplatesNupkgs; GenerateTemplatesNupkgs;
GenerateSdkPlaceholderNupkg;
GenerateVSToolsNupkg; GenerateVSToolsNupkg;
GenerateVSToolsResolverNupkg; GenerateVSToolsResolverNupkg;
GenerateSdkMSBuildExtensionsNupkg" GenerateSdkMSBuildExtensionsNupkg"

View file

@ -254,4 +254,34 @@
MicroBuildCorePath="$(NuGetPackageRoot)microbuild.core\$(MicroBuildCoreVersion)"/> MicroBuildCorePath="$(NuGetPackageRoot)microbuild.core\$(MicroBuildCoreVersion)"/>
</Target> </Target>
<Target Name="SignSdkPlaceholderMsi"
Condition="'$(SignCoreSdk)' == 'true'"
DependsOnTargets="SetSignProps">
<ItemGroup>
<SdkPlaceholderMsiFilesToSign Include="$(SdkPlaceholderMSIInstallerFile)" />
<SdkPlaceholderMsiFileSignInfo Include="@(SdkPlaceholderMsiFilesToSign->'%(Filename)%(Extension)')">
<CertificateName>$(InternalCertificateId)</CertificateName>
</SdkPlaceholderMsiFileSignInfo>
<DistinctSdkPlaceholderMsiFileSignInfo Include="@(SdkPlaceholderMsiFileSignInfo->Distinct())" />
</ItemGroup>
<Microsoft.DotNet.SignTool.SignToolTask
DryRun="$(_DryRun)"
TestSign="$(_TestSign)"
CertificatesSignInfo="$(CertificatesSignInfo)"
ItemsToSign="@(SdkPlaceholderMsiFilesToSign)"
StrongNameSignInfo="@(StrongNameSignInfo)"
FileSignInfo="@(DistinctSdkPlaceholderMsiFileSignInfo)"
FileExtensionSignInfo="@(FileExtensionSignInfo)"
TempDir="$(ArtifactsTmpDir)"
LogDir="$(ArtifactsLogDir)"
MSBuildPath="$(_DesktopMSBuildPath)"
SNBinaryPath="$(NuGetPackageRoot)sn\$(SNVersion)\sn.exe"
MicroBuildCorePath="$(NuGetPackageRoot)microbuild.core\$(MicroBuildCoreVersion)"/>
</Target>
</Project> </Project>

View file

@ -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.NetCore.SdkPlaceholder.$ARCH$</id>
<version>1.0.0</version>
<title>VS.Redist.Common.NetCore.SdkPlaceholder.$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 $MAJOR_MINOR$ SDK ARP Placeholder ($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="$PAYLOAD_FILES$" />
</files>
</package>

View file

@ -23,6 +23,8 @@
<Feature Id="Provider" Absent="disallow" AllowAdvertise="no" Description="Used for Ref Counting" Display="hidden" Level="1" InstallDefault="local" Title="RefCounting" TypicalDefault="install"> <Feature Id="Provider" Absent="disallow" AllowAdvertise="no" Description="Used for Ref Counting" Display="hidden" Level="1" InstallDefault="local" Title="RefCounting" TypicalDefault="install">
<ComponentRef Id="$(var.DependencyKeyId)" /> <ComponentRef Id="$(var.DependencyKeyId)" />
</Feature> </Feature>
<Property Id="ARPNOMODIFY" Value="1" />
<Property Id="ProductFamily" Value="$(var.ProductFamily)" /> <Property Id="ProductFamily" Value="$(var.ProductFamily)" />
<Property Id="ProductEdition" Value="$(var.ProductEdition)" /> <Property Id="ProductEdition" Value="$(var.ProductEdition)" />
<Property Id="ProductCPU" Value="$(var.Platform)" /> <Property Id="ProductCPU" Value="$(var.Platform)" />

View file

@ -22,6 +22,7 @@ param(
[Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion, [Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion,
[Parameter(Mandatory=$true)][string]$WindowsDesktopVersion, [Parameter(Mandatory=$true)][string]$WindowsDesktopVersion,
[Parameter(Mandatory=$true)][string]$UpgradeCode, [Parameter(Mandatory=$true)][string]$UpgradeCode,
[Parameter(Mandatory=$true)][string]$DependencyKeyPrefix,
[Parameter(Mandatory=$true)][string]$Architecture, [Parameter(Mandatory=$true)][string]$Architecture,
[Parameter(Mandatory=$true)][string]$DotNetRuntimeVersion, [Parameter(Mandatory=$true)][string]$DotNetRuntimeVersion,
[Parameter(Mandatory=$true)][string]$AspNetCoreVersion, [Parameter(Mandatory=$true)][string]$AspNetCoreVersion,
@ -44,6 +45,7 @@ function RunCandleForBundle
-dSDKProductBandVersion="$SDKProductBandVersion" ` -dSDKProductBandVersion="$SDKProductBandVersion" `
-dNugetVersion="$DotnetCLINugetVersion" ` -dNugetVersion="$DotnetCLINugetVersion" `
-dCLISDKMsiSourcePath="$CLISDKMSIFile" ` -dCLISDKMsiSourcePath="$CLISDKMSIFile" `
-dDependencyKeyPrefix="$DependencyKeyPrefix" `
-dUpgradeCode="$UpgradeCode" ` -dUpgradeCode="$UpgradeCode" `
-dSharedFXMsiSourcePath="$SharedFxMSIFile" ` -dSharedFXMsiSourcePath="$SharedFxMSIFile" `
-dHostFXRMsiSourcePath="$HostFxrMSIFile" ` -dHostFXRMsiSourcePath="$HostFxrMSIFile" `

View file

@ -10,6 +10,7 @@ param(
[Parameter(Mandatory=$true)][string]$SDKBundleVersion, [Parameter(Mandatory=$true)][string]$SDKBundleVersion,
[Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion, [Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion,
[Parameter(Mandatory=$true)][string]$UpgradeCode, [Parameter(Mandatory=$true)][string]$UpgradeCode,
[Parameter(Mandatory=$true)][string]$DependencyKeyPrefix,
[Parameter(Mandatory=$true)][string]$Architecture, [Parameter(Mandatory=$true)][string]$Architecture,
[Parameter(Mandatory=$true)][string]$StableFileIdForApphostTransform [Parameter(Mandatory=$true)][string]$StableFileIdForApphostTransform
) )
@ -66,6 +67,7 @@ function RunCandle
-dSDKBundleVersion="$SDKBundleVersion" ` -dSDKBundleVersion="$SDKBundleVersion" `
-dNugetVersion="$DotnetCLINugetVersion" ` -dNugetVersion="$DotnetCLINugetVersion" `
-dUpgradeCode="$UpgradeCode" ` -dUpgradeCode="$UpgradeCode" `
-dDependencyKeyPrefix="$DependencyKeyPrefix" `
-arch "$Architecture" ` -arch "$Architecture" `
-ext WixDependencyExtension.dll ` -ext WixDependencyExtension.dll `
"$PSScriptRoot\dotnet.wxs" ` "$PSScriptRoot\dotnet.wxs" `

View file

@ -0,0 +1,105 @@
# 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]$DotnetMSIOutput,
[Parameter(Mandatory=$true)][string]$WixRoot,
[Parameter(Mandatory=$true)][string]$ProductMoniker,
[Parameter(Mandatory=$true)][string]$DotnetMSIVersion,
[Parameter(Mandatory=$true)][string]$SDKBundleVersion,
[Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion,
[Parameter(Mandatory=$true)][string]$UpgradeCode,
[Parameter(Mandatory=$true)][string]$DependencyKeyPrefix,
[Parameter(Mandatory=$true)][string]$Architecture
)
function RunCandle
{
$result = $true
pushd "$WixRoot"
Write-Information "Running candle.."
$candleOutput = .\candle.exe -nologo `
-dDotnetSrc="$inputDir" `
-dMicrosoftEula="$PSScriptRoot\clisdk\dummyeula.rtf" `
-dProductMoniker="$ProductMoniker" `
-dBuildVersion="$DotnetMSIVersion" `
-dSDKBundleVersion="$SDKBundleVersion" `
-dNugetVersion="$DotnetCLINugetVersion" `
-dUpgradeCode="$UpgradeCode" `
-dDependencyKeyPrefix="$DependencyKeyPrefix" `
-arch "$Architecture" `
-ext WixDependencyExtension.dll `
"$PSScriptRoot\sdkplaceholder.wxs" `
"$PSScriptRoot\provider.wxs"
Write-Information "Candle output: $candleOutput"
if($LastExitCode -ne 0)
{
$result = $false
Write-Information "Candle failed with exit code $LastExitCode."
}
popd
return $result
}
function RunLight
{
$result = $true
pushd "$WixRoot"
Write-Information "Running light.."
$CabCache = Join-Path $WixRoot "cabcache"
$lightOutput = .\light.exe -nologo -ext WixUIExtension -ext WixDependencyExtension -ext WixUtilExtension `
-cultures:en-us `
sdkplaceholder.wixobj `
provider.wixobj `
-b "$PSScriptRoot" `
-reusecab `
-cc "$CabCache" `
-out $DotnetMSIOutput
Write-Information "Light output: $lightOutput"
if($LastExitCode -ne 0)
{
$result = $false
Write-Information "Light failed with exit code $LastExitCode."
}
popd
return $result
}
Write-Information "Creating SdkPlaceholder MSI at $DotnetMSIOutput"
if([string]::IsNullOrEmpty($WixRoot))
{
Exit -1
}
if(-Not (RunCandle))
{
Write-Information "Candle failed"
Exit -1
}
if(-Not (RunLight))
{
Write-Information "Light failed"
Exit -1
}
if(!(Test-Path $DotnetMSIOutput))
{
throw "Unable to create the SdkPlaceholder MSI."
Exit -1
}
Write-Information "Successfully created SdkPlaceholder MSI - $DotnetMSIOutput"
exit $LastExitCode

View file

@ -10,6 +10,7 @@ param(
[Parameter(Mandatory=$true)][string]$SDKBundleVersion, [Parameter(Mandatory=$true)][string]$SDKBundleVersion,
[Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion, [Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion,
[Parameter(Mandatory=$true)][string]$UpgradeCode, [Parameter(Mandatory=$true)][string]$UpgradeCode,
[Parameter(Mandatory=$true)][string]$DependencyKeyPrefix,
[Parameter(Mandatory=$true)][string]$Architecture [Parameter(Mandatory=$true)][string]$Architecture
) )
@ -59,6 +60,7 @@ function RunCandle
-dSDKBundleVersion="$SDKBundleVersion" ` -dSDKBundleVersion="$SDKBundleVersion" `
-dNugetVersion="$DotnetCLINugetVersion" ` -dNugetVersion="$DotnetCLINugetVersion" `
-dUpgradeCode="$UpgradeCode" ` -dUpgradeCode="$UpgradeCode" `
-dDependencyKeyPrefix="$DependencyKeyPrefix" `
-arch "$Architecture" ` -arch "$Architecture" `
-ext WixDependencyExtension.dll ` -ext WixDependencyExtension.dll `
"$PSScriptRoot\templates.wxs" ` "$PSScriptRoot\templates.wxs" `

View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?include "Variables.wxi" ?>
<Product Id="*" Name="$(var.ProductName) from Visual Studio" Language="$(var.ProductLanguage)" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package Compressed="yes" InstallScope="perMachine" InstallerVersion="200" />
<Condition Message="$(var.ProductName) must be installed as part of a coordinated SDK installation.">
Installed OR ALLOWMSIINSTALL
</Condition>
<Condition Message="$(var.ProductName) was installed with Visual Studio. If you wish to uninstall, use the Visual Studio Installer and select: &apos;Modify&apos;">
NOT Installed OR ALLOWMSIUNINSTALL
</Condition>
<MajorUpgrade DowngradeErrorMessage="$(var.DowngradeErrorMessage)" Schedule="afterInstallInitialize"/>
<Feature Id="Provider" Absent="disallow" AllowAdvertise="no" Description="Used for Ref Counting" Display="hidden" Level="1" InstallDefault="local" Title="RefCounting" TypicalDefault="install">
<ComponentRef Id="$(var.DependencyKeyId)" />
</Feature>
<Property Id="ARPNOMODIFY" Value="1" />
<Property Id="ProductFamily" Value="$(var.ProductFamily)" />
<Property Id="ProductEdition" Value="$(var.ProductEdition)" />
<Property Id="ProductCPU" Value="$(var.Platform)" />
<Property Id="RTM_ProductVersion" Value="$(var.Dotnet_ProductVersion)" />
<Property Id="MSIFASTINSTALL" Value="7" />
<WixVariable Id="WixUILicenseRtf" Value="$(var.MicrosoftEula)" />
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir" />
</Fragment>
</Wix>

View file

@ -30,6 +30,6 @@
<?error Invalid Platform ($(var.Platform))?> <?error Invalid Platform ($(var.Platform))?>
<?endif?> <?endif?>
<?define DependencyKey = "Dotnet_CLI_$(var.SDKBundleVersion)_$(var.Platform)"?> <?define DependencyKey = "$(var.DependencyKeyPrefix)_$(var.SDKBundleVersion)_$(var.Platform)"?>
<?define DependencyKeyId = "$(var.DependencyKey)" ?> <?define DependencyKeyId = "$(var.DependencyKey)" ?>
</Include> </Include>