543 lines
30 KiB
XML
543 lines
30 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>$(WixPackageVersion)</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>
|
|
|
|
<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)' ^
|
|
'$(CliProductBandVersion)00' ^
|
|
'$(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="GenerateWorkloadManifestsWxs"
|
|
DependsOnTargets="ValidateBundledManifestSigning">
|
|
<PropertyGroup>
|
|
<WorkloadManifestsWxsPath>$(IntermediateOutputPath)WorkloadManifests.wxs</WorkloadManifestsWxsPath>
|
|
<WorkloadManifestsWxsContent>
|
|
<![CDATA[
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
|
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
|
<Fragment>
|
|
<PackageGroup Id="PG_WorkloadManifests">
|
|
@(BundledManifests->'<MsiPackage SourceFile="%(RestoredMsiPathInNupkg)">
|
|
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
|
|
</MsiPackage>', '
|
|
')
|
|
</PackageGroup>
|
|
</Fragment>
|
|
</Wix>
|
|
]]>
|
|
</WorkloadManifestsWxsContent>
|
|
</PropertyGroup>
|
|
|
|
<WriteLinesToFile File="$(WorkloadManifestsWxsPath)"
|
|
Lines="$(WorkloadManifestsWxsContent)"
|
|
WriteOnlyWhenDifferent="true"
|
|
Overwrite="true" />
|
|
</Target>
|
|
|
|
<Target Name="GenerateSdkBundle"
|
|
DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;GenerateSdkMsi;SignSdkMsi;GenerateTemplatesMsis;GenerateWorkloadManifestsWxs;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) ^
|
|
-WorkloadManifestWxsFile '$(WorkloadManifestsWxsPath)' ^
|
|
-CLISDKMSIFile '$(SdkMSIInstallerFile)' ^
|
|
-ASPNETRuntimeWixLibFile '$(DownloadsFolder)$(DownloadedAspNetCoreSharedFxWixLibFileName)' ^
|
|
-SharedFxMSIFile '$(DownloadsFolder)$(DownloadedSharedFrameworkInstallerFileName)' ^
|
|
-HostFxrMSIFile '$(DownloadsFolder)$(DownloadedHostFxrInstallerFileName)' ^
|
|
-SharedHostMSIFile '$(DownloadsFolder)$(DownloadedSharedHostInstallerFileName)' ^
|
|
-WinFormsAndWpfMSIFile '$(DownloadsFolder)$(DownloadedWinFormsAndWpfSharedFrameworkInstallerFileName)' ^
|
|
-NetCoreAppTargetingPackMSIFile '$(DownloadsFolder)$(DownloadedNetCoreAppTargetingPackInstallerFileName)' ^
|
|
-NetStandardTargetingPackMSIFile '$(DownloadsFolder)$(DownloadedNetStandardTargetingPackInstallerFileName)' ^
|
|
-NetCoreAppHostPackMSIFile '$(DownloadsFolder)$(DownloadedNetCoreAppHostPackInstallerFileName)' ^
|
|
-AlternateNetCoreAppHostPackMSIFile '$(DownloadsFolder)$(DownloadedAlternateNetCoreAppHostPackInstallerFileName)' ^
|
|
-ArmNetCoreAppHostPackMSIFile '$(DownloadsFolder)$(DownloadedArmNetCoreAppHostPackInstallerFileName)' ^
|
|
-Arm64NetCoreAppHostPackMSIFile '$(DownloadsFolder)$(DownloadedArm64NetCoreAppHostPackInstallerFileName)' ^
|
|
-AspNetTargetingPackMSIFile '$(DownloadsFolder)$(DownloadedAspNetTargetingPackInstallerFileName)' ^
|
|
-WindowsDesktopTargetingPackMSIFile '$(DownloadsFolder)$(DownloadedWindowsDesktopTargetingPackInstallerFileName)' ^
|
|
-FinalizerExe '$(FinalizerExe)' ^
|
|
-TemplatesMSIFile '$(LatestTemplateMsiInstallerFile)' ^
|
|
-DotnetBundleOutput '$(CombinedFrameworkSdkHostMSIInstallerFile)' ^
|
|
-WixRoot '$(WixRoot)' ^
|
|
-ProductMoniker '$(SdkBrandName)' ^
|
|
-DotnetMSIVersion '$(MsiVersion)' ^
|
|
-SDKBundleVersion '$(SDKBundleVersion)' ^
|
|
-DotnetCLINugetVersion '$(Version)' ^
|
|
-WindowsDesktopVersion '$(MicrosoftWindowsDesktopAppRuntimePackageVersion)' ^
|
|
-UpgradeCode '$(CombinedFrameworkSDKHostInstallerUpgradeCode)' ^
|
|
-DependencyKeyName '$(SdkDependencyKeyName)' ^
|
|
-Architecture '$(Architecture)' ^
|
|
-DotNetRuntimeVersion '$(MicrosoftNETCoreAppRuntimePackageVersion)' ^
|
|
-AspNetCoreVersion '$(MicrosoftAspNetCoreAppRuntimePackageVersion)' ^
|
|
-SDKProductBandVersion '$(CliProductBandVersion)' ^
|
|
-InformationAction Continue " />
|
|
<ItemGroup>
|
|
<BundleMsiWixSrcFiles Include="$(WixRoot)\bundle.wixobj" />
|
|
<BundleMsiWixSrcFiles Include="$(WixRoot)\WorkloadManifests.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)' != '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="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' Or '$(Architecture)' == 'arm64') "
|
|
Inputs="$(MSBuildExtensionsLayoutDirectory)/**/*;
|
|
$(SdkMSBuildExtensionsNuspecFile);
|
|
$(GenerateNupkgPowershellScript)"
|
|
Outputs="$(SdkMSBuildExtensionsNupkgFile);$(SdkMSBuildExtensionsSwrFile)">
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
|
'$(ArtifactsDir)' ^
|
|
'$(MSBuildExtensionsLayoutDirectory.TrimEnd('\'))' ^
|
|
'$(FullNugetVersion)' ^
|
|
'$(SdkMSBuildExtensionsNuspecFile)' ^
|
|
'$(SdkMSBuildExtensionsNupkgFile)' ^
|
|
'$(Architecture)'" />
|
|
|
|
<GenerateMSBuildExtensionsSWR Condition="'$(Architecture)' == 'x64'"
|
|
MSBuildExtensionsLayoutDirectory="$(MSBuildExtensionsLayoutDirectory)"
|
|
OutputFile="$(SdkMSBuildExtensionsSwrFile)"/>
|
|
|
|
</Target>
|
|
|
|
<Target Name="GenerateVSTemplateLocatorNupkg"
|
|
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs"
|
|
Condition=" '$(OS)' == 'Windows_NT' And ('$(Architecture)' == 'x64' Or '$(Architecture)' == 'arm64') "
|
|
Inputs="$(MSBuildExtensionsLayoutDirectory)/**/*;
|
|
$(VSTemplateLocatorNuspecFile);
|
|
$(GenerateNupkgPowershellScript)"
|
|
Outputs="$(VSTemplateLocatorNupkgFile)">
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
|
'$(ArtifactsDir)' ^
|
|
'$(VSTemplateLocatorLayoutPath.TrimEnd('\'))' ^
|
|
'$(FullNugetVersion)' ^
|
|
'$(VSTemplateLocatorNuspecFile)' ^
|
|
'$(VSTemplateLocatorNupkgFile)' ^
|
|
'$(Architecture)'" />
|
|
|
|
</Target>
|
|
|
|
<Target Name="GenerateMsis"
|
|
DependsOnTargets="GenerateLayout;
|
|
MsiTargetsSetupInputOutputs;
|
|
AcquireWix;
|
|
GenerateSdkMsi;
|
|
SignSdkMsi;
|
|
GenerateTemplatesMsis;
|
|
SignTemplatesMsis;
|
|
GenerateSdkBundle;
|
|
SignSdkBundle;
|
|
GenerateSdkPlaceholderMsi;
|
|
SignSdkPlaceholderMsi;
|
|
GenerateToolsetNupkg;
|
|
GenerateTemplatesNupkgs;
|
|
GenerateSdkPlaceholderNupkg;
|
|
GenerateVSToolsNupkg;
|
|
GenerateVSToolsResolverNupkg;
|
|
GenerateSdkMSBuildExtensionsNupkg;
|
|
GenerateVSTemplateLocatorNupkg"
|
|
Condition=" '$(OS)' == 'Windows_NT' and '$(Architecture)' != 'arm' " />
|
|
|
|
|
|
</Project>
|