2016-06-28 01:26:57 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
2018-10-31 20:56:32 +00:00
|
|
|
<Target Name="SetupWixProperties" DependsOnTargets="GetCurrentRuntimeInformation">
|
2017-02-23 18:37:48 +00:00
|
|
|
<!-- AcquireWix Properties -->
|
|
|
|
<PropertyGroup>
|
2018-01-02 20:37:00 +00:00
|
|
|
<WixVersion>3.10.4</WixVersion>
|
2017-02-23 18:37:48 +00:00
|
|
|
<WixDownloadUrl>https://dotnetcli.azureedge.net/build/wix/wix.$(WixVersion).zip</WixDownloadUrl>
|
2018-10-31 20:56:32 +00:00
|
|
|
<WixRoot>$(ArtifactsDir)Tools/WixTools/$(WixVersion)</WixRoot>
|
2017-02-23 18:37:48 +00:00
|
|
|
<WixDestinationPath>$(WixRoot)/WixTools.$(WixVersion).zip</WixDestinationPath>
|
|
|
|
<WixDownloadSentinel>$(WixRoot)/WixDownload.$(WixVersion).sentinel</WixDownloadSentinel>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<!-- Generate MSI/Bundle Properties -->
|
|
|
|
<PropertyGroup>
|
2018-10-31 20:56:32 +00:00
|
|
|
<CombinedFrameworkSdkHostBundleEngineName>$(ArtifactsShippingPackagesDir)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)-engine.exe</CombinedFrameworkSdkHostBundleEngineName>
|
2017-02-23 18:37:48 +00:00
|
|
|
|
2018-10-31 20:56:32 +00:00
|
|
|
<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>
|
2017-02-23 18:37:48 +00:00
|
|
|
|
2018-10-31 20:56:32 +00:00
|
|
|
<SdkInstallerNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.$(Architecture).nuspec</SdkInstallerNuspecFile>
|
2019-01-11 19:55:28 +00:00
|
|
|
<SdkInstallerNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg</SdkInstallerNupkgFile>
|
2019-01-09 00:02:47 +00:00
|
|
|
<VSToolsNuspecFile>$(MSBuildThisFileDirectory)/packaging/windows/clisdk/VS.Tools.Net.Core.SDK.$(Architecture).nuspec</VSToolsNuspecFile>
|
2019-01-11 19:55:28 +00:00
|
|
|
<VSToolsNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Tools.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg</VSToolsNupkgFile>
|
2017-06-27 23:49:34 +00:00
|
|
|
|
2019-02-15 02:21:23 +00:00
|
|
|
<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>
|
|
|
|
|
2018-10-31 20:56:32 +00:00
|
|
|
<!--<SdkMSBuildExtensionsNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.nuspec</SdkMSBuildExtensionsNuspecFile>
|
2019-01-11 19:55:28 +00:00
|
|
|
<SdkMSBuildExtensionsNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.$(FullNugetVersion).nupkg</SdkMSBuildExtensionsNupkgFile>
|
|
|
|
<SdkMSBuildExtensionsSwrFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.swr</SdkMSBuildExtensionsSwrFile>-->
|
2017-02-23 18:37:48 +00:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
2018-11-06 22:29:00 +00:00
|
|
|
<SdkMSIInstallerFile>$(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkMSIInstallerFile>
|
|
|
|
<CombinedFrameworkSdkHostMSIInstallerFile>$(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostMSIInstallerFile>
|
2019-02-19 22:21:54 +00:00
|
|
|
<SdkBundleInstallerOutputGuidString>$(ProductBandCombinedHostHostFxrFrameworkSdkName)</SdkBundleInstallerOutputGuidString>
|
2018-10-31 20:56:32 +00:00
|
|
|
|
2018-11-02 06:15:59 +00:00
|
|
|
<!--<SdkDebianIntermediateDirectory>$(IntermediateOutputPath)debian/sdk/</SdkDebianIntermediateDirectory>
|
2018-10-31 20:56:32 +00:00
|
|
|
<LayoutDirectory Condition=" '$(OSName)' == 'ubuntu' OR '$(OSName)' == 'debian' ">$(SdkDebianIntermediateDirectory)debianLayoutDirectory</LayoutDirectory>
|
|
|
|
<LayoutDirectory Condition=" '$(OSName)' != 'ubuntu' AND '$(OSName)' != 'debian' ">$(IntermediateOutputPath)layouts</LayoutDirectory>
|
|
|
|
<SdkLayoutOutputDirectory>$(LayoutDirectory)$(ArtifactNameSdk)</SdkLayoutOutputDirectory>
|
2018-11-02 06:15:59 +00:00
|
|
|
<MSBuildExtensionsOutputDirectory>$(LayoutDirectory)MSBuildExtensions</MSBuildExtensionsOutputDirectory>-->
|
2017-02-23 18:37:48 +00:00
|
|
|
</PropertyGroup>
|
2018-10-31 20:56:32 +00:00
|
|
|
</Target>
|
2016-06-28 01:26:57 +00:00
|
|
|
|
2018-10-31 20:56:32 +00:00
|
|
|
<Target Name="MsiTargetsSetupInputOutputs"
|
|
|
|
DependsOnTargets="GenerateLayout;SetupWixProperties;GetCoreSdkGitCommitInfo">
|
|
|
|
<!-- Generate SDK MSI Inputs -->
|
|
|
|
<ItemGroup>
|
|
|
|
<GenerateSdkMsiInputs Include="$(SdkInternalLayoutPath)**/*;
|
2017-02-07 18:56:06 +00:00
|
|
|
$(SdkGenerateMsiPowershellScript)" />
|
2018-10-31 20:56:32 +00:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<!-- Consumed By Publish -->
|
|
|
|
<ItemGroup>
|
2018-11-06 22:29:00 +00:00
|
|
|
<GeneratedInstallers Include="$(SdkMSIInstallerFile);$(CombinedFrameworkSdkHostMSIInstallerFile)" />
|
2018-10-31 20:56:32 +00:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<GenerateMsiVersion CommitCount="$(GitCommitCount)"
|
|
|
|
VersionMajor="$(VersionMajor)"
|
|
|
|
VersionMinor="$(VersionMinor)"
|
|
|
|
VersionPatch="$(VersionPatch)">
|
|
|
|
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
|
|
|
|
</GenerateMsiVersion>
|
|
|
|
|
2018-11-06 22:29:00 +00:00
|
|
|
<GenerateGuidFromName Name="$(SdkMSIInstallerFile)">
|
2018-10-31 20:56:32 +00:00
|
|
|
<Output TaskParameter="OutputGuid"
|
|
|
|
PropertyName="SdkInstallerUpgradeCode" />
|
|
|
|
</GenerateGuidFromName>
|
|
|
|
|
2019-02-19 22:21:54 +00:00
|
|
|
<GenerateGuidFromName Name="$(SdkBundleInstallerOutputGuidString)">
|
2018-10-31 20:56:32 +00:00
|
|
|
<Output TaskParameter="OutputGuid"
|
|
|
|
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="@(GenerateSdkMsiInputs)"
|
2018-11-06 22:29:00 +00:00
|
|
|
Outputs="$(SdkMSIInstallerFile)">
|
2018-10-31 20:56:32 +00:00
|
|
|
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateMsiPowershellScript) ^
|
|
|
|
'$(SdkInternalLayoutPath.TrimEnd('\'))' ^
|
2018-11-06 22:29:00 +00:00
|
|
|
'$(SdkMSIInstallerFile)' ^
|
2018-09-26 20:15:34 +00:00
|
|
|
'$(WixRoot)' ^
|
|
|
|
'$(SdkBrandName)' ^
|
|
|
|
'$(MsiVersion)' ^
|
2019-03-01 21:07:12 +00:00
|
|
|
'$(SDKBundleVersion)' ^
|
2018-09-26 20:15:34 +00:00
|
|
|
'$(NugetVersion)' ^
|
|
|
|
'$(SdkInstallerUpgradeCode)' ^
|
|
|
|
'$(Architecture)' ^
|
|
|
|
'$(SdkStableFileIdForApphostTransform)' ^
|
2018-10-31 20:56:32 +00:00
|
|
|
-InformationAction Continue" />
|
|
|
|
</Target>
|
2016-06-28 01:26:57 +00:00
|
|
|
|
2018-10-31 20:56:32 +00:00
|
|
|
<Target Name="GenerateSdkBundle"
|
|
|
|
DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;GenerateSdkMsi"
|
|
|
|
Condition=" '$(OS)' == 'Windows_NT'"
|
2018-11-06 22:29:00 +00:00
|
|
|
Inputs="$(SdkMSIInstallerFile);
|
2016-06-28 01:26:57 +00:00
|
|
|
$(DownloadedSharedFrameworkInstallerFile);
|
|
|
|
$(DownloadedHostFxrInstallerFile);
|
|
|
|
$(DownloadedSharedHostInstallerFile);
|
|
|
|
$(SdkGenerateBundlePowershellScript)"
|
2018-11-06 22:29:00 +00:00
|
|
|
Outputs="$(CombinedFrameworkSdkHostMSIInstallerFile)">
|
2018-10-31 20:56:32 +00:00
|
|
|
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateBundlePowershellScript) ^
|
2018-11-06 22:29:00 +00:00
|
|
|
'$(SdkMSIInstallerFile)' ^
|
2018-12-06 18:49:10 +00:00
|
|
|
'$(DownloadsFolder)$(DownloadedAspNetCoreSharedFxInstallerFileName)' ^
|
|
|
|
'$(DownloadsFolder)$(DownloadedSharedFrameworkInstallerFileName)' ^
|
|
|
|
'$(DownloadsFolder)$(DownloadedHostFxrInstallerFileName)' ^
|
|
|
|
'$(DownloadsFolder)$(DownloadedSharedHostInstallerFileName)' ^
|
|
|
|
'$(DownloadsFolder)$(DownloadedWinFormsAndWpfSharedFrameworkInstallerFileName)' ^
|
2019-02-21 00:36:11 +00:00
|
|
|
'$(DownloadsFolder)$(DownloadedNetCoreAppTargetingPackInstallerFileName)' ^
|
2019-04-10 15:55:46 +00:00
|
|
|
'$(DownloadsFolder)$(DownloadedNetStandardTargetingPackInstallerFileName)' ^
|
2019-02-21 00:36:11 +00:00
|
|
|
'$(DownloadsFolder)$(DownloadedAspNetTargetingPackInstallerFileName)' ^
|
2019-03-19 21:15:32 +00:00
|
|
|
'$(DownloadsFolder)$(DownloadedWindowsDesktopTargetingPackInstallerFileName)' ^
|
2018-11-06 22:29:00 +00:00
|
|
|
'$(CombinedFrameworkSdkHostMSIInstallerFile)' ^
|
2018-09-26 20:15:34 +00:00
|
|
|
'$(WixRoot)' ^
|
|
|
|
'$(SdkBrandName)' ^
|
|
|
|
'$(MsiVersion)' ^
|
2019-03-01 21:07:12 +00:00
|
|
|
'$(SDKBundleVersion)' ^
|
2018-09-26 20:15:34 +00:00
|
|
|
'$(NugetVersion)' ^
|
2018-12-26 18:46:40 +00:00
|
|
|
'$(MicrosoftWindowsDesktopPackageVersion)' ^
|
2018-09-26 20:15:34 +00:00
|
|
|
'$(CombinedFrameworkSDKHostInstallerUpgradeCode)' ^
|
|
|
|
'$(Architecture)' ^
|
|
|
|
'$(MicrosoftNETCoreAppPackageVersion)' ^
|
2018-10-31 20:56:32 +00:00
|
|
|
'$(AspNetCoreVersion)' ^
|
2019-02-19 22:21:54 +00:00
|
|
|
'$(CliProductBandVersion)' ^
|
2018-10-31 20:56:32 +00:00
|
|
|
-InformationAction Continue " />
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="GenerateSdkNupkg"
|
|
|
|
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
|
|
|
|
Condition=" '$(OS)' == 'Windows_NT'"
|
2018-11-06 22:29:00 +00:00
|
|
|
Inputs="$(CombinedFrameworkSdkHostMSIInstallerFile);
|
2016-10-05 20:53:15 +00:00
|
|
|
$(SdkInstallerNuspecFile);
|
|
|
|
$(SdkGenerateNupkgPowershellScript)"
|
2018-10-31 20:56:32 +00:00
|
|
|
Outputs="$(SdkInstallerNupkgFile)">
|
2016-10-05 20:53:15 +00:00
|
|
|
|
2018-12-06 21:32:32 +00:00
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript) ^
|
2018-11-06 22:29:00 +00:00
|
|
|
'$(CombinedFrameworkSdkHostMSIInstallerFile)' ^
|
2018-09-26 20:15:34 +00:00
|
|
|
'$(FullNugetVersion)' ^
|
|
|
|
'$(SdkInstallerNuspecFile)' ^
|
2018-12-06 21:32:32 +00:00
|
|
|
'$(SdkInstallerNupkgFile)'" />
|
2018-10-31 20:56:32 +00:00
|
|
|
</Target>
|
2016-10-05 20:53:15 +00:00
|
|
|
|
2019-01-09 00:02:47 +00:00
|
|
|
<Target Name="GenerateVSToolsNupkg"
|
|
|
|
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
|
|
|
|
Condition=" '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x86'"
|
|
|
|
Inputs="$(RedistLayoutPath)/**/*;
|
|
|
|
$(VSToolsNuspecFile);
|
|
|
|
$(SdkGenerateNupkgPowershellScript)"
|
|
|
|
Outputs="$(VSToolsNupkgFile)">
|
|
|
|
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript) ^
|
|
|
|
'$(RedistLayoutPath.TrimEnd('\'))' ^
|
|
|
|
'$(FullNugetVersion)' ^
|
|
|
|
'$(VSToolsNuspecFile)' ^
|
|
|
|
'$(VSToolsNupkgFile)'" />
|
|
|
|
</Target>
|
|
|
|
|
2019-02-15 02:21:23 +00:00
|
|
|
<Target Name="GenerateVSToolsResolverNupkg"
|
|
|
|
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
|
|
|
|
Condition=" '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x86'"
|
|
|
|
Inputs="$(SdkResolverLayoutPath)/**/*;
|
|
|
|
$(VSToolsResolverNuspecFile);
|
|
|
|
$(SdkGenerateNupkgPowershellScript)"
|
|
|
|
Outputs="$(VSToolsResolverNupkgFile)">
|
|
|
|
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript) ^
|
|
|
|
'$(SdkResolverLayoutPath.TrimEnd('\'))' ^
|
|
|
|
'$(FullNugetVersion)' ^
|
|
|
|
'$(VSToolsResolverNuspecFile)' ^
|
|
|
|
'$(VSToolsResolverNupkgFile)'" />
|
|
|
|
</Target>
|
|
|
|
|
2018-10-31 20:56:32 +00:00
|
|
|
<Target Name="GenerateSdkMSBuildExtensionsNupkg"
|
|
|
|
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
|
|
|
|
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "
|
|
|
|
Inputs="$(MSBuildExtensionsLayoutDirectory)/**/*;
|
2017-03-24 00:25:40 +00:00
|
|
|
$(SdkInstallerNuspecFile);
|
|
|
|
$(SdkGenerateNupkgPowershellScript)"
|
2018-10-31 20:56:32 +00:00
|
|
|
Outputs="$(SdkMSBuildExtensionsNupkgFile);$(SdkMSBuildExtensionsSwrFile)">
|
2017-03-24 00:25:40 +00:00
|
|
|
|
2018-12-06 21:32:32 +00:00
|
|
|
<!-- Disabling this for now because we don't have the MSBuildExtensions available.
|
|
|
|
https://github.com/dotnet/cli/issues/10260 -->
|
2017-10-13 18:52:47 +00:00
|
|
|
|
2018-10-31 20:56:32 +00:00
|
|
|
<!-- <Exec Command="powershell -NoProfile -NoLogo -InformationAction Continue $(SdkGenerateNupkgPowershellScript) ^
|
2018-09-26 20:15:34 +00:00
|
|
|
'$(MSBuildExtensionsLayoutDirectory)' ^
|
|
|
|
'$(FullNugetVersion)' ^
|
|
|
|
'$(SdkMSBuildExtensionsNuspecFile)' ^
|
2017-03-24 00:25:40 +00:00
|
|
|
'$(SdkMSBuildExtensionsNupkgFile)'" />
|
2017-06-09 18:18:46 +00:00
|
|
|
|
|
|
|
<GenerateMSBuildExtensionsSWR MSBuildExtensionsLayoutDirectory="$(MSBuildExtensionsLayoutDirectory)"
|
2017-10-13 18:52:47 +00:00
|
|
|
OutputFile="$(SdkMSBuildExtensionsSwrFile)"/> -->
|
2018-10-31 20:56:32 +00:00
|
|
|
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="GenerateMsis"
|
|
|
|
DependsOnTargets="GenerateLayout;
|
2016-06-28 01:26:57 +00:00
|
|
|
MsiTargetsSetupInputOutputs;
|
|
|
|
AcquireWix;
|
|
|
|
GenerateSdkMsi;
|
2018-12-06 18:49:10 +00:00
|
|
|
SignSdkMsi;
|
2016-06-28 01:26:57 +00:00
|
|
|
GenerateSdkBundle;
|
2018-12-06 18:49:10 +00:00
|
|
|
SignSdkBundle;
|
2016-10-05 20:53:15 +00:00
|
|
|
GenerateSdkNupkg;
|
2019-01-09 00:02:47 +00:00
|
|
|
GenerateVSToolsNupkg;
|
2019-02-15 02:21:23 +00:00
|
|
|
GenerateVSToolsResolverNupkg;
|
2017-10-13 18:52:47 +00:00
|
|
|
GenerateSdkMSBuildExtensionsNupkg"
|
2018-12-05 20:21:56 +00:00
|
|
|
Condition=" '$(OS)' == 'Windows_NT' and !$(Architecture.StartsWith('arm'))" />
|
2016-06-28 01:26:57 +00:00
|
|
|
|
2018-12-07 02:22:29 +00:00
|
|
|
|
2016-06-28 01:26:57 +00:00
|
|
|
</Project>
|