![Matt Mitchell](/assets/img/avatar_default.png)
After https://github.com/dotnet/installer/pull/11843, post build signing started failing, failing to find one of the input wixobj files. The wixobj was not included in the wixpack. This is because the installer repo uses custom scripts to generate MSIs, rather than the arcade tasks (which would handle adding this transparently), so the input files need to be added explicitly.
575 lines
32 KiB
XML
575 lines
32 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<PropertyGroup>
|
|
<MicrosoftDotNetBuildTasksInstallersTaskTargetFramework Condition="'$(MSBuildRuntimeType)' == 'Core'">netcoreapp3.1</MicrosoftDotNetBuildTasksInstallersTaskTargetFramework>
|
|
<MicrosoftDotNetBuildTasksInstallersTaskTargetFramework Condition="'$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildOffline)' != 'true' ">net6.0</MicrosoftDotNetBuildTasksInstallersTaskTargetFramework>
|
|
<MicrosoftDotNetBuildTasksInstallersTaskTargetFramework Condition="'$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildOffline)' == 'true' ">net6.0</MicrosoftDotNetBuildTasksInstallersTaskTargetFramework>
|
|
<MicrosoftDotNetBuildTasksInstallersTaskTargetFramework Condition="'$(MSBuildRuntimeType)' != 'Core'">net472</MicrosoftDotNetBuildTasksInstallersTaskTargetFramework>
|
|
<MicrosoftDotNetBuildTasksInstallersTaskAssembly>$(NuGetPackageRoot)microsoft.dotnet.build.tasks.installers\$(MicrosoftDotNetBuildTasksInstallersPackageVersion)\tools\$(MicrosoftDotNetBuildTasksInstallersTaskTargetFramework)\Microsoft.DotNet.Build.Tasks.Installers.dll</MicrosoftDotNetBuildTasksInstallersTaskAssembly>
|
|
</PropertyGroup>
|
|
|
|
<UsingTask TaskName="CreateLightCommandPackageDrop" AssemblyFile="$(MicrosoftDotNetBuildTasksInstallersTaskAssembly)" />
|
|
|
|
<Target Name="SetupWixProperties" DependsOnTargets="GetCurrentRuntimeInformation">
|
|
<!-- AcquireWix Properties -->
|
|
<PropertyGroup>
|
|
<WixVersion>1.0.0-v3.14.0.4118</WixVersion>
|
|
<WixDownloadUrl>https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/wix/Microsoft.Signed.Wix-$(WixVersion).zip</WixDownloadUrl>
|
|
<WixRoot>$(ArtifactsDir)Tools/WixTools/$(WixVersion)</WixRoot>
|
|
<WixDestinationPath>$(WixRoot)/WixTools.$(WixVersion).zip</WixDestinationPath>
|
|
<WixDownloadSentinel>$(WixRoot)/WixDownload.$(WixVersion).sentinel</WixDownloadSentinel>
|
|
</PropertyGroup>
|
|
|
|
<!-- Generate MSI/Bundle Properties -->
|
|
<PropertyGroup>
|
|
<CombinedFrameworkSdkHostBundleEngineName>$(ArtifactsTmpDir)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)-engine.exe</CombinedFrameworkSdkHostBundleEngineName>
|
|
|
|
<SdkGenerateMsiPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatemsi.ps1</SdkGenerateMsiPowershellScript>
|
|
<SdkPlaceholderGenerateMsiPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatesdkplaceholdermsi.ps1</SdkPlaceholderGenerateMsiPowershellScript>
|
|
<SdkStableFileIdForApphostTransform>$(MSBuildThisFileDirectory)packaging/windows/clisdk/stablefileidforapphosttransform.xslt</SdkStableFileIdForApphostTransform>
|
|
<SdkGenerateBundlePowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatebundle.ps1</SdkGenerateBundlePowershellScript>
|
|
<GenerateNupkgPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatenupkg.ps1</GenerateNupkgPowershellScript>
|
|
|
|
<FinalizerExe>$(ArtifactsDir)bin/finalizer/$(Architecture)/$(Configuration)/bin/finalizer.exe</FinalizerExe>
|
|
|
|
<ToolsetInstallerNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.NetCore.Toolset.nuspec</ToolsetInstallerNuspecFile>
|
|
<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>
|
|
<VSToolsNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Tools.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg</VSToolsNupkgFile>
|
|
|
|
<ManifestInstallerNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.NetCore.Manifest.nuspec</ManifestInstallerNuspecFile>
|
|
<ManifestInstallerNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.NetCore.Manifest.$(Architecture).$(FullNugetVersion).nupkg</ManifestInstallerNupkgFile>
|
|
|
|
<SdkResolverLayoutPath>$(ArtifactsDir)bin/SdkResolver/$(Configuration)</SdkResolverLayoutPath>
|
|
<VSToolsResolverNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Tools.Net.Core.SDK.Resolver.nuspec</VSToolsResolverNuspecFile>
|
|
<VSToolsResolverNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Tools.Net.Core.SDK.Resolver.nupkg</VSToolsResolverNupkgFile>
|
|
|
|
<SdkMSBuildExtensionsNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.nuspec</SdkMSBuildExtensionsNuspecFile>
|
|
<SdkMSBuildExtensionsNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.$(FullNugetVersion).nupkg</SdkMSBuildExtensionsNupkgFile>
|
|
<SdkMSBuildExtensionsSwrFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.swr</SdkMSBuildExtensionsSwrFile>
|
|
|
|
<VSTemplateLocatorLayoutPath>$(ArtifactsDir)bin/VSTemplateLocator/Debug</VSTemplateLocatorLayoutPath>
|
|
<VSTemplateLocatorNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.VSTemplateLocator.nuspec</VSTemplateLocatorNuspecFile>
|
|
<VSTemplateLocatorNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.Net.Core.SDK.VSTemplateLocator.$(FullNugetVersion).nupkg</VSTemplateLocatorNupkgFile>
|
|
|
|
<!-- Temp directory for light command layouts -->
|
|
<LightCommandObjDir>$(ArtifactsObjDir)/LightCommandPackages</LightCommandObjDir>
|
|
<!-- Directory for the zipped up light command package -->
|
|
<LightCommandPackagesDir>$(ArtifactsNonShippingPackagesDir)</LightCommandPackagesDir>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<SdkMSIInstallerFile>$(ArtifactsNonShippingPackagesDir)$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkMSIInstallerFile>
|
|
<SdkDependencyKeyName>Dotnet_CLI</SdkDependencyKeyName>
|
|
<SdkPlaceholderMSIInstallerFile>$(ArtifactsNonShippingPackagesDir)dotnet-sdkplaceholder-$(FullNugetVersion)-$(ProductMonikerRid)$(InstallerExtension)</SdkPlaceholderMSIInstallerFile>
|
|
<SdkPlaceholderDependencyKeyName>NetCore_SdkPlaceholder</SdkPlaceholderDependencyKeyName>
|
|
<CombinedFrameworkSdkHostMSIInstallerFile>$(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostMSIInstallerFile>
|
|
<SdkBundleInstallerOutputGuidString>$(ProductBandCombinedHostHostFxrFrameworkSdkName)</SdkBundleInstallerOutputGuidString>
|
|
|
|
<!--<SdkDebianIntermediateDirectory>$(IntermediateOutputPath)debian/sdk/</SdkDebianIntermediateDirectory>
|
|
<LayoutDirectory Condition=" '$(OSName)' == 'ubuntu' OR '$(OSName)' == 'debian' ">$(SdkDebianIntermediateDirectory)debianLayoutDirectory</LayoutDirectory>
|
|
<LayoutDirectory Condition=" '$(OSName)' != 'ubuntu' AND '$(OSName)' != 'debian' ">$(IntermediateOutputPath)layouts</LayoutDirectory>
|
|
<SdkLayoutOutputDirectory>$(LayoutDirectory)$(ArtifactNameSdk)</SdkLayoutOutputDirectory>
|
|
<MSBuildExtensionsOutputDirectory>$(LayoutDirectory)MSBuildExtensions</MSBuildExtensionsOutputDirectory>-->
|
|
</PropertyGroup>
|
|
|
|
<Exec Command="git rev-list --count HEAD"
|
|
ConsoleToMSBuild="true"
|
|
Condition=" '$(GitCommitCount)' == '' ">
|
|
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitCount" />
|
|
</Exec>
|
|
|
|
<Error Condition=" '$(OfficialBuild)' == 'true' And '$(_PatchNumber)' == '' "
|
|
Text="_PatchNumber should not be empty in an official build. Check if there were changes in Arcade." />
|
|
|
|
<PropertyGroup>
|
|
<GitCommitCount>$(GitCommitCount.PadLeft(6,'0'))</GitCommitCount>
|
|
|
|
<!-- This number comes from arcade and combines the date based build number id and the revision (incremental number per day) -->
|
|
<CombinedBuildNumberAndRevision>$(_PatchNumber)</CombinedBuildNumberAndRevision>
|
|
<!-- Fallback to commit count when patch number is not set. This happens only during CI. -->
|
|
<CombinedBuildNumberAndRevision Condition=" '$(CombinedBuildNumberAndRevision)' == '' ">$(GitCommitCount)</CombinedBuildNumberAndRevision>
|
|
|
|
<!-- This number comes from arcade and combines the date based build number id and the revision (incremental number per day) -->
|
|
<SDKBundleVersion>$(FileVersion)</SDKBundleVersion>
|
|
<!-- Fallback to commit count when patch number is not set. This happens only during CI. -->
|
|
<SDKBundleVersion Condition=" '$(SDKBundleVersion)' == '' ">$(VersionPrefix).$(CombinedBuildNumberAndRevision)</SDKBundleVersion>
|
|
</PropertyGroup>
|
|
</Target>
|
|
|
|
<Target Name="MsiTargetsSetupInputOutputs"
|
|
DependsOnTargets="GenerateLayout;SetupWixProperties;SetupTemplatesMsis">
|
|
<!-- Consumed By Publish -->
|
|
<ItemGroup>
|
|
<GeneratedInstallers Include="$(SdkMSIInstallerFile);$(CombinedFrameworkSdkHostMSIInstallerFile);$(SdkPlaceholderMSIInstallerFile)" />
|
|
<GeneratedInstallers Include="@(TemplatesMsiComponent->'%(MSIInstallerFile)')" />
|
|
<GeneratedInstallers Include="@(BundledManifests->'%(MSIInstallerFile)')" />
|
|
</ItemGroup>
|
|
|
|
<GenerateMsiVersion BuildNumber="$(CombinedBuildNumberAndRevision)"
|
|
Major="$(VersionMajor)"
|
|
Minor="$(VersionMinor)"
|
|
Patch="$(VersionFeature)">
|
|
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
|
|
</GenerateMsiVersion>
|
|
|
|
<GenerateGuidFromName Name="$(SdkMSIInstallerFile)">
|
|
<Output TaskParameter="GeneratedGuid"
|
|
PropertyName="SdkInstallerUpgradeCode" />
|
|
</GenerateGuidFromName>
|
|
|
|
<GenerateGuidFromName Name="$(SdkPlaceholderMSIInstallerFile)">
|
|
<Output TaskParameter="GeneratedGuid"
|
|
PropertyName="SdkPlaceholderInstallerUpgradeCode" />
|
|
</GenerateGuidFromName>
|
|
|
|
<GenerateGuidFromName Name="$(SdkBundleInstallerOutputGuidString)">
|
|
<Output TaskParameter="GeneratedGuid"
|
|
PropertyName="CombinedFrameworkSDKHostInstallerUpgradeCode" />
|
|
</GenerateGuidFromName>
|
|
</Target>
|
|
|
|
<Target Name="AcquireWix"
|
|
DependsOnTargets="SetupWixProperties;MsiTargetsSetupInputOutputs"
|
|
Inputs="$(WixDownloadSentinel)"
|
|
Outputs="$(WixDestinationPath)">
|
|
|
|
<!-- Setup sentinel to take advantage of incrementality -->
|
|
<MakeDir Directories="$(WixRoot)" />
|
|
<WriteLinesToFile
|
|
File="$(WixDownloadSentinel)"
|
|
Lines="$(WixVersion)"
|
|
Overwrite="true"
|
|
Encoding="Unicode"/>
|
|
|
|
<DownloadFile
|
|
Uri="$(WixDownloadUrl)"
|
|
DestinationPath="$(WixDestinationPath)"
|
|
Overwrite="false" />
|
|
|
|
<ExtractArchiveToDirectory
|
|
SourceArchive="$(WixDestinationPath)"
|
|
DestinationDirectory="$(WixRoot)" />
|
|
|
|
</Target>
|
|
|
|
<Target Name="GenerateSdkMsi"
|
|
DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;SetSdkBrandingInfo"
|
|
Condition=" '$(OS)' == 'Windows_NT' "
|
|
Inputs="$(SdkInternalLayoutPath)**/*;
|
|
$(SdkGenerateMsiPowershellScript)"
|
|
Outputs="$(SdkMSIInstallerFile)">
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateMsiPowershellScript) ^
|
|
'$(SdkInternalLayoutPath.TrimEnd('\'))' ^
|
|
'$(SdkMSIInstallerFile)' ^
|
|
'$(WixRoot)' ^
|
|
'$(ToolsetBrandName)' ^
|
|
'$(VersionPrefix)' ^
|
|
'$(MsiVersion)' ^
|
|
'$(SDKBundleVersion)' ^
|
|
'$(Version)' ^
|
|
'$(SdkInstallerUpgradeCode)' ^
|
|
'$(SdkDependencyKeyName)' ^
|
|
'$(Architecture)' ^
|
|
'$(SdkStableFileIdForApphostTransform)' ^
|
|
-InformationAction Continue" />
|
|
<ItemGroup>
|
|
<SdkMsiWixSrcFiles Include="$(WixRoot)\dotnet.wixobj" />
|
|
<SdkMsiWixSrcFiles Include="$(WixRoot)\provider.wixobj" />
|
|
<SdkMsiWixSrcFiles Include="$(WixRoot)\registrykeys.wixobj" />
|
|
<SdkMsiWixSrcFiles Include="$(WixRoot)\dotnethome_x64.wixobj" />
|
|
<SdkMsiWixSrcFiles Include="$(WixRoot)\install-files.wixobj" />
|
|
</ItemGroup>
|
|
<CreateLightCommandPackageDrop
|
|
LightCommandWorkingDir="$(LightCommandObjDir)"
|
|
OutputFolder="$(LightCommandPackagesDir)"
|
|
AdditionalBasePaths="$(MSBuildThisFileDirectory)packaging\windows\clisdk"
|
|
NoLogo="true"
|
|
Cultures="en-us"
|
|
InstallerFile="$(SdkMSIInstallerFile)"
|
|
WixExtensions="WixUIExtension;WixDependencyExtension;WixUtilExtension"
|
|
WixSrcFiles="@(SdkMsiWixSrcFiles)">
|
|
<Output TaskParameter="OutputFile" PropertyName="_LightCommandPackageNameOutput" />
|
|
</CreateLightCommandPackageDrop>
|
|
</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)' ^
|
|
'$(Version)' ^
|
|
'$(SdkPlaceholderInstallerUpgradeCode)' ^
|
|
'$(SdkPlaceholderDependencyKeyName)' ^
|
|
'$(Architecture)' ^
|
|
-InformationAction Continue" />
|
|
<ItemGroup>
|
|
<SdkPlaceholdMsiWixSrcFiles Include="$(WixRoot)\provider.wixobj" />
|
|
<SdkPlaceholdMsiWixSrcFiles Include="$(WixRoot)\sdkplaceholder.wixobj" />
|
|
</ItemGroup>
|
|
<CreateLightCommandPackageDrop
|
|
LightCommandWorkingDir="$(LightCommandObjDir)"
|
|
OutputFolder="$(LightCommandPackagesDir)"
|
|
NoLogo="true"
|
|
Cultures="en-us"
|
|
InstallerFile="$(SdkPlaceholderMSIInstallerFile)"
|
|
WixExtensions="WixUIExtension;WixDependencyExtension;WixUtilExtension"
|
|
WixSrcFiles="@(SdkPlaceholdMsiWixSrcFiles)"
|
|
AdditionalBasePaths="$(MSBuildThisFileDirectory)packaging/windows/clisdk">
|
|
<Output TaskParameter="OutputFile" PropertyName="_LightCommandPackageNameOutput" />
|
|
</CreateLightCommandPackageDrop>
|
|
</Target>
|
|
|
|
<Target Name="GenerateTemplatesMsis"
|
|
DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;SetSdkBrandingInfo;SetupTemplatesMsis"
|
|
Condition="$(ProductMonikerRid.StartsWith('win')) And '$(Architecture)' != 'arm'"
|
|
Inputs="@(TemplatesMsiComponent);$(TemplatesGenerateMsiPowershellScript)"
|
|
Outputs="%(TemplatesMsiComponent.MSIInstallerFile)">
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(TemplatesGenerateMsiPowershellScript) ^
|
|
'%(TemplatesMsiComponent.LayoutPath)' ^
|
|
'%(TemplatesMsiComponent.MSIInstallerFile)' ^
|
|
'$(WixRoot)' ^
|
|
'%(TemplatesMsiComponent.BrandName)' ^
|
|
'%(TemplatesMsiComponent.MsiVersion)' ^
|
|
'%(TemplatesMsiComponent.MsiVersion)' ^
|
|
'$(FullNugetVersion)' ^
|
|
'%(TemplatesMsiComponent.UpgradeCode)' ^
|
|
'%(TemplatesMsiComponent.DependencyKeyName)' ^
|
|
'$(Architecture)' ^
|
|
-InformationAction Continue" />
|
|
<ItemGroup>
|
|
<TemplatesMsiWixSrcFiles Include="$(WixRoot)\provider.wixobj" />
|
|
<TemplatesMsiWixSrcFiles Include="$(WixRoot)\templates.wixobj" />
|
|
<TemplatesMsiWixSrcFiles Include="$(WixRoot)\dotnethome_x64.wixobj" />
|
|
<TemplatesMsiWixSrcFiles Include="$(WixRoot)\template-install-files.wixobj" />
|
|
</ItemGroup>
|
|
|
|
<CreateLightCommandPackageDrop
|
|
LightCommandWorkingDir="$(LightCommandObjDir)"
|
|
OutputFolder="$(LightCommandPackagesDir)"
|
|
NoLogo="true"
|
|
Cultures="en-us"
|
|
InstallerFile="%(TemplatesMsiComponent.MSIInstallerFile)"
|
|
WixExtensions="WixUIExtension;WixDependencyExtension;WixUtilExtension"
|
|
WixSrcFiles="@(TemplatesMsiWixSrcFiles)">
|
|
<Output TaskParameter="OutputFile" PropertyName="_LightCommandPackageNameOutput" />
|
|
</CreateLightCommandPackageDrop>
|
|
</Target>
|
|
|
|
<Target Name="SetupTemplatesMsis">
|
|
<PropertyGroup>
|
|
<TemplatesGenerateMsiPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatetemplatesmsi.ps1</TemplatesGenerateMsiPowershellScript>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<TemplatesMsiComponent Include="@(TemplatesComponents)">
|
|
<LayoutPath>$(BaseOutputPath)$(Configuration)\templates-%(TemplatesComponents.TemplatesMajorMinorVersion)</LayoutPath>
|
|
<BrandName>%(TemplatesComponents.BrandNameWithoutVersion) $(Version)</BrandName>
|
|
<MsiVersion>%(TemplatesComponents.MSIVersion)</MsiVersion>
|
|
<UpgradeCode>%(TemplatesComponents.InstallerUpgradeCode)</UpgradeCode>
|
|
<DependencyKeyName>NetCore_Templates_%(TemplatesComponents.TemplatesMajorMinorVersion)</DependencyKeyName>
|
|
</TemplatesMsiComponent>
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
<Target Name="GenerateManifestsMsi"
|
|
DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;SetSdkBrandingInfo"
|
|
Condition="$(ProductMonikerRid.StartsWith('win')) And '$(Architecture)' != 'arm'"
|
|
Inputs="@(BundledManifests);$(ManifestsGenerateMsiPowershellScript)"
|
|
Outputs="$(ManifestsMSIInstallerFile)">
|
|
|
|
<PropertyGroup>
|
|
<ManifestsGenerateMsiPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatemanifestsmsi.ps1</ManifestsGenerateMsiPowershellScript>
|
|
</PropertyGroup>
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(ManifestsGenerateMsiPowershellScript) ^
|
|
'$(ManifestsLayoutPath)' ^
|
|
'$(ManifestsMSIInstallerFile)' ^
|
|
'$(WixRoot)' ^
|
|
'$(ManifestsBrandName)' ^
|
|
'$(ManifestMsiVersion)' ^
|
|
'$(ManifestMsiVersion)' ^
|
|
'$(FullNugetVersion)' ^
|
|
'$(ManifestsInstallerUpgradeCode)' ^
|
|
'$(ManifestsDependencyKeyName)' ^
|
|
'$(Architecture)' ^
|
|
-InformationAction Continue" />
|
|
<ItemGroup>
|
|
<ManifestsMsiWixSrcFiles Include="$(WixRoot)\provider.wixobj" />
|
|
<ManifestsMsiWixSrcFiles Include="$(WixRoot)\Manifests.wixobj" />
|
|
<ManifestsMsiWixSrcFiles Include="$(WixRoot)\dotnethome_x64.wixobj" />
|
|
<ManifestsMsiWixSrcFiles Include="$(WixRoot)\Manifest-install-files.wixobj" />
|
|
</ItemGroup>
|
|
|
|
<CreateLightCommandPackageDrop
|
|
LightCommandWorkingDir="$(LightCommandObjDir)"
|
|
OutputFolder="$(LightCommandPackagesDir)"
|
|
NoLogo="true"
|
|
Cultures="en-us"
|
|
InstallerFile="$(ArtifactsNonShippingPackagesDir)$(ManifestsMSIInstallerFile)"
|
|
WixExtensions="WixUIExtension;WixDependencyExtension;WixUtilExtension"
|
|
WixSrcFiles="@(ManifestsMsiWixSrcFiles)">
|
|
<Output TaskParameter="OutputFile" PropertyName="_LightCommandPackageNameOutput" />
|
|
</CreateLightCommandPackageDrop>
|
|
</Target>
|
|
|
|
<Target Name="GenerateSdkBundle"
|
|
DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;GenerateSdkMsi;SignSdkMsi;GenerateTemplatesMsis;GenerateManifestsMsi;SignTemplatesMsis"
|
|
Condition=" '$(OS)' == 'Windows_NT' "
|
|
Inputs="$(SdkMSIInstallerFile);
|
|
$(DownloadedSharedFrameworkInstallerFile);
|
|
$(DownloadedHostFxrInstallerFile);
|
|
$(DownloadedSharedHostInstallerFile);
|
|
$(SdkGenerateBundlePowershellScript)"
|
|
Outputs="$(CombinedFrameworkSdkHostMSIInstallerFile)">
|
|
|
|
<!-- Choose "latest" template MSI to go in bundle. -->
|
|
<ItemGroup>
|
|
<LatestTemplateInstallerComponent Include="@(TemplatesMsiComponent)"
|
|
Condition="'%(TemplatesMajorMinorVersion)' == '$(MajorMinorVersion)'"/>
|
|
</ItemGroup>
|
|
<PropertyGroup>
|
|
<LatestTemplateMsiInstallerFile>@(LatestTemplateInstallerComponent->'%(MSIInstallerFile)')</LatestTemplateMsiInstallerFile>
|
|
</PropertyGroup>
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateBundlePowershellScript) ^
|
|
'$(SdkMSIInstallerFile)' ^
|
|
'$(DownloadsFolder)$(DownloadedAspNetCoreSharedFxWixLibFileName)' ^
|
|
'$(DownloadsFolder)$(DownloadedSharedFrameworkInstallerFileName)' ^
|
|
'$(DownloadsFolder)$(DownloadedHostFxrInstallerFileName)' ^
|
|
'$(DownloadsFolder)$(DownloadedSharedHostInstallerFileName)' ^
|
|
'$(DownloadsFolder)$(DownloadedWinFormsAndWpfSharedFrameworkInstallerFileName)' ^
|
|
'$(DownloadsFolder)$(DownloadedNetCoreAppTargetingPackInstallerFileName)' ^
|
|
'$(DownloadsFolder)$(DownloadedNetStandardTargetingPackInstallerFileName)' ^
|
|
'$(DownloadsFolder)$(DownloadedNetCoreAppHostPackInstallerFileName)' ^
|
|
'$(DownloadsFolder)$(DownloadedAlternateNetCoreAppHostPackInstallerFileName)' ^
|
|
'$(DownloadsFolder)$(DownloadedArmNetCoreAppHostPackInstallerFileName)' ^
|
|
'$(DownloadsFolder)$(DownloadedArm64NetCoreAppHostPackInstallerFileName)' ^
|
|
'$(DownloadsFolder)$(DownloadedAspNetTargetingPackInstallerFileName)' ^
|
|
'$(DownloadsFolder)$(DownloadedWindowsDesktopTargetingPackInstallerFileName)' ^
|
|
'$(FinalizerExe)' ^
|
|
'$(LatestTemplateMsiInstallerFile)' ^
|
|
'$(ManifestsMsiInstallerFile)' ^
|
|
'$(CombinedFrameworkSdkHostMSIInstallerFile)' ^
|
|
'$(WixRoot)' ^
|
|
'$(SdkBrandName)' ^
|
|
'$(MsiVersion)' ^
|
|
'$(SDKBundleVersion)' ^
|
|
'$(Version)' ^
|
|
'$(MicrosoftWindowsDesktopAppRuntimePackageVersion)' ^
|
|
'$(CombinedFrameworkSDKHostInstallerUpgradeCode)' ^
|
|
'$(SdkDependencyKeyName)' ^
|
|
'$(Architecture)' ^
|
|
'$(MicrosoftNETCoreAppRuntimePackageVersion)' ^
|
|
'$(MicrosoftAspNetCoreAppRuntimePackageVersion)' ^
|
|
'$(CliProductBandVersion)' ^
|
|
-InformationAction Continue " />
|
|
<ItemGroup>
|
|
<BundleMsiWixSrcFiles Include="$(WixRoot)\bundle.wixobj" />
|
|
<BundleMsiWixSrcFiles Include="$(DownloadsFolder)$(DownloadedAspNetCoreSharedFxWixLibFileName)" />
|
|
</ItemGroup>
|
|
<CreateLightCommandPackageDrop
|
|
LightCommandWorkingDir="$(LightCommandObjDir)"
|
|
OutputFolder="$(LightCommandPackagesDir)"
|
|
NoLogo="true"
|
|
Cultures="en-us"
|
|
InstallerFile="$(CombinedFrameworkSdkHostMSIInstallerFile)"
|
|
WixExtensions="WixBalExtension;WixUtilExtension;WixTagExtension"
|
|
WixSrcFiles="@(BundleMsiWixSrcFiles)"
|
|
AdditionalBasePaths="$(MSBuildThisFileDirectory)packaging/windows/clisdk">
|
|
<Output TaskParameter="OutputFile" PropertyName="_LightCommandPackageNameOutput" />
|
|
</CreateLightCommandPackageDrop>
|
|
</Target>
|
|
|
|
<Target Name="GenerateToolsetNupkg"
|
|
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateSdkMsi;SignSdkMsi"
|
|
Condition=" '$(OS)' == 'Windows_NT' "
|
|
Inputs="$(SdkMSIInstallerFile);
|
|
$(ToolsetInstallerNuspecFile);
|
|
$(GenerateNupkgPowershellScript)"
|
|
Outputs="$(ToolsetInstallerNupkgFile)">
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
|
'$(ArtifactsDir)' ^
|
|
'$(SdkMSIInstallerFile)' ^
|
|
'$(FullNugetVersion)' ^
|
|
'$(ToolsetInstallerNuspecFile)' ^
|
|
'$(ToolsetInstallerNupkgFile)' ^
|
|
'$(Architecture)' ^
|
|
'$(MajorMinorVersion)'" />
|
|
</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"
|
|
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateTemplatesMsis;SignTemplatesMsis;SetupTemplatesNupkgs"
|
|
Condition="$(ProductMonikerRid.StartsWith('win')) And !$(Architecture.StartsWith('arm'))"
|
|
Inputs="@(TemplatesNupkgComponent->'%(MSIInstallerFile)');
|
|
$(TemplatesInstallerNuspecFile);
|
|
$(GenerateNupkgPowershellScript)"
|
|
Outputs="@(TemplatesNupkgComponent->'%(NupkgFile)')">
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
|
'$(ArtifactsDir)' ^
|
|
'%(TemplatesNupkgComponent.MSIInstallerFile)' ^
|
|
'$(FullNugetVersion)' ^
|
|
'$(TemplatesInstallerNuspecFile)' ^
|
|
'@(TemplatesNupkgComponent->'%(NupkgFile)')' ^
|
|
'$(Architecture)' ^
|
|
'@(TemplatesNupkgComponent->'%(MajorMinorVersion)')'" />
|
|
</Target>
|
|
|
|
<Target Name="SetupTemplatesNupkgs">
|
|
<PropertyGroup>
|
|
<TemplatesInstallerNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.NetCore.Templates.nuspec</TemplatesInstallerNuspecFile>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<TemplatesNupkgComponent Include="@(TemplatesComponents->'%(Identity)Nupkg')">
|
|
<NupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.NetCore.Templates.%(TemplatesMajorMinorVersion).$(FullNugetVersion).nupkg</NupkgFile>
|
|
<MajorMinorVersion>%(TemplatesMajorMinorVersion)</MajorMinorVersion>
|
|
</TemplatesNupkgComponent>
|
|
</ItemGroup>
|
|
|
|
</Target>
|
|
|
|
<Target Name="GenerateManifestNupkg"
|
|
DependsOnTargets="GenerateLayout;GenerateManifestsMsi"
|
|
Condition=" '$(OS)' == 'Windows_NT' "
|
|
Inputs="$(ManifestsMSIInstallerFile);
|
|
$(ManifestInstallerNuspecFile);
|
|
$(GenerateNupkgPowershellScript)"
|
|
Outputs="$(ManifestInstallerNupkgFile)">
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
|
'$(ArtifactsDir)' ^
|
|
'$(ManifestsMSIInstallerFile)' ^
|
|
'$(FullNugetVersion)' ^
|
|
'$(ManifestInstallerNuspecFile)' ^
|
|
'$(ManifestInstallerNupkgFile)' ^
|
|
'$(Architecture)' ^
|
|
'$(MajorMinorVersion)'" />
|
|
</Target>
|
|
|
|
<Target Name="GenerateVSToolsNupkg"
|
|
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs"
|
|
Condition=" '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x86' "
|
|
Inputs="$(RedistLayoutPath)/**/*;
|
|
$(VSToolsNuspecFile);
|
|
$(GenerateNupkgPowershellScript)"
|
|
Outputs="$(VSToolsNupkgFile)">
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
|
'$(ArtifactsDir)' ^
|
|
'$(RedistLayoutPath.TrimEnd('\'))' ^
|
|
'$(FullNugetVersion)' ^
|
|
'$(VSToolsNuspecFile)' ^
|
|
'$(VSToolsNupkgFile)' ^
|
|
'$(Architecture)'" />
|
|
</Target>
|
|
|
|
<Target Name="GenerateVSToolsResolverNupkg"
|
|
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs"
|
|
Condition=" '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x86' "
|
|
Inputs="$(SdkResolverLayoutPath)/**/*;
|
|
$(VSToolsResolverNuspecFile);
|
|
$(GenerateNupkgPowershellScript)"
|
|
Outputs="$(VSToolsResolverNupkgFile)">
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
|
'$(ArtifactsDir)' ^
|
|
'$(SdkResolverLayoutPath.TrimEnd('\'))' ^
|
|
'$(FullNugetVersion)' ^
|
|
'$(VSToolsResolverNuspecFile)' ^
|
|
'$(VSToolsResolverNupkgFile)'" />
|
|
</Target>
|
|
|
|
<Target Name="GenerateSdkMSBuildExtensionsNupkg"
|
|
DependsOnTargets="GenerateLayout;GenerateMSBuildExtensions;MsiTargetsSetupInputOutputs"
|
|
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "
|
|
Inputs="$(MSBuildExtensionsLayoutDirectory)/**/*;
|
|
$(SdkMSBuildExtensionsNuspecFile);
|
|
$(GenerateNupkgPowershellScript)"
|
|
Outputs="$(SdkMSBuildExtensionsNupkgFile);$(SdkMSBuildExtensionsSwrFile)">
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
|
'$(ArtifactsDir)' ^
|
|
'$(MSBuildExtensionsLayoutDirectory.TrimEnd('\'))' ^
|
|
'$(FullNugetVersion)' ^
|
|
'$(SdkMSBuildExtensionsNuspecFile)' ^
|
|
'$(SdkMSBuildExtensionsNupkgFile)'" />
|
|
|
|
<GenerateMSBuildExtensionsSWR MSBuildExtensionsLayoutDirectory="$(MSBuildExtensionsLayoutDirectory)"
|
|
OutputFile="$(SdkMSBuildExtensionsSwrFile)"/>
|
|
|
|
</Target>
|
|
|
|
<Target Name="GenerateVSTemplateLocatorNupkg"
|
|
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs"
|
|
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "
|
|
Inputs="$(MSBuildExtensionsLayoutDirectory)/**/*;
|
|
$(VSTemplateLocatorNuspecFile);
|
|
$(GenerateNupkgPowershellScript)"
|
|
Outputs="$(VSTemplateLocatorNupkgFile)">
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
|
'$(ArtifactsDir)' ^
|
|
'$(VSTemplateLocatorLayoutPath.TrimEnd('\'))' ^
|
|
'$(FullNugetVersion)' ^
|
|
'$(VSTemplateLocatorNuspecFile)' ^
|
|
'$(VSTemplateLocatorNupkgFile)'" />
|
|
|
|
</Target>
|
|
|
|
<Target Name="GenerateMsis"
|
|
DependsOnTargets="GenerateLayout;
|
|
MsiTargetsSetupInputOutputs;
|
|
AcquireWix;
|
|
GenerateSdkMsi;
|
|
SignSdkMsi;
|
|
GenerateTemplatesMsis;
|
|
GenerateManifestsMsi;
|
|
SignTemplatesMsis;
|
|
GenerateSdkBundle;
|
|
SignSdkBundle;
|
|
GenerateSdkPlaceholderMsi;
|
|
SignSdkPlaceholderMsi;
|
|
GenerateToolsetNupkg;
|
|
GenerateManifestNupkg;
|
|
GenerateTemplatesNupkgs;
|
|
GenerateSdkPlaceholderNupkg;
|
|
GenerateVSToolsNupkg;
|
|
GenerateVSToolsResolverNupkg;
|
|
GenerateSdkMSBuildExtensionsNupkg;
|
|
GenerateVSTemplateLocatorNupkg"
|
|
Condition=" '$(OS)' == 'Windows_NT' and '$(Architecture)' != 'arm' " />
|
|
|
|
|
|
</Project>
|