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">
|
2017-02-23 18:37:48 +00:00
|
|
|
<!-- AcquireWix Properties -->
|
|
|
|
<PropertyGroup>
|
|
|
|
<WixVersion>3.10.2</WixVersion>
|
|
|
|
<WixDownloadUrl>https://dotnetcli.azureedge.net/build/wix/wix.$(WixVersion).zip</WixDownloadUrl>
|
|
|
|
<WixRoot>$(IntermediateDirectory)/WixTools/$(WixVersion)</WixRoot>
|
|
|
|
<WixDestinationPath>$(WixRoot)/WixTools.$(WixVersion).zip</WixDestinationPath>
|
|
|
|
<WixDownloadSentinel>$(WixRoot)/WixDownload.$(WixVersion).sentinel</WixDownloadSentinel>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<!-- Generate MSI/Bundle Properties -->
|
|
|
|
<PropertyGroup>
|
|
|
|
<CombinedFrameworkSdkHostBundleEngineName>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)-engine.exe</CombinedFrameworkSdkHostBundleEngineName>
|
|
|
|
|
|
|
|
<SdkGenerateMsiPowershellScript>$(RepoRoot)/packaging/windows/clisdk/generatemsi.ps1</SdkGenerateMsiPowershellScript>
|
|
|
|
<SdkGenerateBundlePowershellScript>$(RepoRoot)/packaging/windows/clisdk/generatebundle.ps1</SdkGenerateBundlePowershellScript>
|
|
|
|
<SdkGenerateNupkgPowershellScript>$(RepoRoot)/packaging/windows/clisdk/generatenupkg.ps1</SdkGenerateNupkgPowershellScript>
|
|
|
|
|
2017-06-27 23:49:34 +00:00
|
|
|
<MSBuildExtensionsGenerateMsiPowershellScript>$(RepoRoot)/packaging/windows/msbuildextensions/generatemsi.ps1</MSBuildExtensionsGenerateMsiPowershellScript>
|
|
|
|
|
2017-02-23 18:37:48 +00:00
|
|
|
<SdkInstallerNuspecFile>$(RepoRoot)/packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.$(Architecture).nuspec</SdkInstallerNuspecFile>
|
|
|
|
<SdkInstallerNupkgFile>$(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg</SdkInstallerNupkgFile>
|
2017-03-24 00:25:40 +00:00
|
|
|
|
|
|
|
<SdkMSBuildExtensionsNuspecFile>$(RepoRoot)/packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.nuspec</SdkMSBuildExtensionsNuspecFile>
|
|
|
|
<SdkMSBuildExtensionsNupkgFile>$(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.$(FullNugetVersion).nupkg</SdkMSBuildExtensionsNupkgFile>
|
2017-06-09 18:18:46 +00:00
|
|
|
<SdkMSBuildExtensionsSwrFile>$(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.swr</SdkMSBuildExtensionsSwrFile>
|
2017-02-23 18:37:48 +00:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<!-- Test Sdk MSI Properties -->
|
|
|
|
<PropertyGroup>
|
|
|
|
<SdkTestMsiPowershellScript>$(RepoRoot)/test/Installer/testmsi.ps1</SdkTestMsiPowershellScript>
|
|
|
|
<SdkMsiTestedSentinel>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk).MsiTested.sentinel</SdkMsiTestedSentinel>
|
|
|
|
</PropertyGroup>
|
2016-06-28 01:26:57 +00:00
|
|
|
|
2017-02-23 18:37:48 +00:00
|
|
|
<Target Name="MsiTargetsSetupInputOutputs" DependsOnTargets="Init">
|
2017-02-07 18:56:06 +00:00
|
|
|
<!-- Generate SDK MSI Inputs -->
|
|
|
|
<ItemGroup>
|
|
|
|
<GenerateSdkMsiInputs Include="$(SdkLayoutOutputDirectory)/**/*;
|
|
|
|
$(SdkGenerateMsiPowershellScript)" />
|
2017-06-27 23:49:34 +00:00
|
|
|
<GenerateMSBuildExtensionsMsiInputs Include="$(MSBuildExtensionsOutputDirectory)/**/*;
|
|
|
|
$(MSBuildExtensionsGenerateMsiPowershellScript)" />
|
2017-02-07 18:56:06 +00:00
|
|
|
</ItemGroup>
|
2017-02-28 18:16:52 +00:00
|
|
|
|
|
|
|
<!-- Consumed By Publish -->
|
|
|
|
<ItemGroup>
|
|
|
|
<GeneratedInstallers Include="$(SdkInstallerFile);$(CombinedFrameworkSdkHostInstallerFile)" />
|
2017-06-27 23:49:34 +00:00
|
|
|
<GeneratedInstallers Condition=" '$(Architecture)' == 'x86' " Include="$(MSBuildExtensionsInstallerFile)" />
|
2017-02-28 18:16:52 +00:00
|
|
|
</ItemGroup>
|
2017-02-07 18:56:06 +00:00
|
|
|
|
2017-02-10 20:13:44 +00:00
|
|
|
<GenerateMsiVersion CommitCount="$(CommitCount)"
|
|
|
|
VersionMajor="$(VersionMajor)"
|
|
|
|
VersionMinor="$(VersionMinor)"
|
2017-05-11 13:59:38 +00:00
|
|
|
VersionPatch="$(VersionPatch)">
|
2017-02-10 20:13:44 +00:00
|
|
|
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
|
|
|
|
</GenerateMsiVersion>
|
|
|
|
|
2016-06-28 01:26:57 +00:00
|
|
|
<GenerateGuidFromName Name="$(SdkInstallerFile)">
|
|
|
|
<Output TaskParameter="OutputGuid"
|
|
|
|
PropertyName="SdkInstallerUpgradeCode" />
|
|
|
|
</GenerateGuidFromName>
|
|
|
|
|
2017-06-27 23:49:34 +00:00
|
|
|
<GenerateGuidFromName Name="$(MSBuildExtensionsInstallerFile)">
|
|
|
|
<Output TaskParameter="OutputGuid"
|
|
|
|
PropertyName="MSBuildExtensionsInstallerUpgradeCode" />
|
|
|
|
</GenerateGuidFromName>
|
|
|
|
|
2016-06-28 01:26:57 +00:00
|
|
|
<GenerateGuidFromName Name="$(CombinedFrameworkSdkHostInstallerFile)">
|
|
|
|
<Output TaskParameter="OutputGuid"
|
|
|
|
PropertyName="CombinedFrameworkSDKHostInstallerUpgradeCode" />
|
|
|
|
</GenerateGuidFromName>
|
|
|
|
</Target>
|
|
|
|
|
2016-07-26 04:29:59 +00:00
|
|
|
<Target Name="AcquireWix"
|
2016-06-28 01:26:57 +00:00
|
|
|
DependsOnTargets="Init;MsiTargetsSetupInputOutputs"
|
|
|
|
Inputs="$(WixDownloadSentinel)"
|
|
|
|
Outputs="$(WixDestinationPath)">
|
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<!-- Setup sentinel to take advantage of incrementality -->
|
|
|
|
<MakeDir Directories="$(WixRoot)" />
|
|
|
|
<WriteLinesToFile
|
|
|
|
File="$(WixDownloadSentinel)"
|
|
|
|
Lines="$(WixVersion)"
|
|
|
|
Overwrite="true"
|
|
|
|
Encoding="Unicode"/>
|
2016-07-26 04:29:59 +00:00
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<DownloadFile
|
|
|
|
Uri="$(WixDownloadUrl)"
|
|
|
|
DestinationPath="$(WixDestinationPath)"
|
|
|
|
Overwrite="false" />
|
2016-06-28 01:26:57 +00:00
|
|
|
|
2016-07-26 04:29:59 +00:00
|
|
|
<ZipFileExtractToDirectory
|
|
|
|
SourceArchive="$(WixDestinationPath)"
|
2016-06-29 23:21:46 +00:00
|
|
|
DestinationDirectory="$(WixRoot)" />
|
2016-06-28 01:26:57 +00:00
|
|
|
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="GenerateSdkMsi"
|
|
|
|
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs"
|
2017-02-07 18:56:06 +00:00
|
|
|
Condition=" '$(OS)' == 'Windows_NT'"
|
|
|
|
Inputs="@(GenerateSdkMsiInputs)"
|
|
|
|
Outputs="$(SdkInstallerFile)">
|
2016-06-28 01:26:57 +00:00
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateMsiPowershellScript)
|
|
|
|
'$(SdkLayoutOutputDirectory)'
|
|
|
|
'$(SdkInstallerFile)'
|
|
|
|
'$(WixRoot)'
|
|
|
|
'$(SdkBrandName)'
|
|
|
|
'$(MsiVersion)'
|
|
|
|
'$(SimpleVersion)'
|
|
|
|
'$(NugetVersion)'
|
|
|
|
'$(SdkInstallerUpgradeCode)'
|
|
|
|
'$(Architecture)'" />
|
2016-06-28 01:26:57 +00:00
|
|
|
</Target>
|
|
|
|
|
2017-06-27 23:49:34 +00:00
|
|
|
<Target Name="GenerateMSBuildExtensionsMsi"
|
|
|
|
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs"
|
|
|
|
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x86' "
|
|
|
|
Inputs="@(GenerateMSBuildExtensionsMsiInputs)"
|
|
|
|
Outputs="$(MSBuildExtensionsInstallerFile)">
|
|
|
|
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(MSBuildExtensionsGenerateMsiPowershellScript)
|
|
|
|
'$(MSBuildExtensionsOutputDirectory)'
|
|
|
|
'$(MSBuildExtensionsInstallerFile)'
|
|
|
|
'$(WixRoot)'
|
|
|
|
'$(MSBuildExtensionsBrandName)'
|
|
|
|
'$(SimpleVersion)'
|
|
|
|
'$(SimpleVersion)'
|
|
|
|
'$(NugetVersion)'
|
|
|
|
'$(MSBuildExtensionsInstallerUpgradeCode)'
|
|
|
|
'$(Architecture)'" />
|
|
|
|
</Target>
|
|
|
|
|
2016-06-28 01:26:57 +00:00
|
|
|
<Target Name="GenerateSdkBundle"
|
|
|
|
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs;GenerateSdkMsi"
|
|
|
|
Condition=" '$(OS)' == 'Windows_NT'"
|
|
|
|
Inputs="$(SdkInstallerFile);
|
|
|
|
$(DownloadedSharedFrameworkInstallerFile);
|
|
|
|
$(DownloadedHostFxrInstallerFile);
|
|
|
|
$(DownloadedSharedHostInstallerFile);
|
|
|
|
$(SdkGenerateBundlePowershellScript)"
|
|
|
|
Outputs="$(CombinedFrameworkSdkHostInstallerFile)">
|
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateBundlePowershellScript)
|
|
|
|
'$(SdkInstallerFile)'
|
2017-05-02 04:42:51 +00:00
|
|
|
'$(AspNetCoreRuntimeInstallerWixLibFile)'
|
2017-01-27 19:49:54 +00:00
|
|
|
'$(DownloadedSharedFrameworkInstallerFile)'
|
|
|
|
'$(DownloadedHostFxrInstallerFile)'
|
|
|
|
'$(DownloadedSharedHostInstallerFile)'
|
2016-06-29 23:21:46 +00:00
|
|
|
'$(CombinedFrameworkSdkHostInstallerFile)'
|
|
|
|
'$(WixRoot)'
|
|
|
|
'$(SdkBrandName)'
|
|
|
|
'$(MsiVersion)'
|
|
|
|
'$(SimpleVersion)'
|
|
|
|
'$(NugetVersion)'
|
|
|
|
'$(CombinedFrameworkSDKHostInstallerUpgradeCode)'
|
|
|
|
'$(Architecture)'" />
|
2016-06-28 01:26:57 +00:00
|
|
|
</Target>
|
|
|
|
|
2016-10-05 20:53:15 +00:00
|
|
|
<Target Name="GenerateSdkNupkg"
|
|
|
|
DependsOnTargets="Init;Layout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
|
|
|
|
Condition=" '$(OS)' == 'Windows_NT'"
|
|
|
|
Inputs="$(CombinedFrameworkSdkHostInstallerFile);
|
|
|
|
$(SdkInstallerNuspecFile);
|
|
|
|
$(SdkGenerateNupkgPowershellScript)"
|
|
|
|
Outputs="$(SdkInstallerNupkgFile)">
|
|
|
|
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript)
|
|
|
|
'$(CombinedFrameworkSdkHostInstallerFile)'
|
2017-02-10 06:31:46 +00:00
|
|
|
'$(FullNugetVersion)'
|
2016-10-05 20:53:15 +00:00
|
|
|
'$(SdkInstallerNuspecFile)'
|
|
|
|
'$(SdkInstallerNupkgFile)'" />
|
|
|
|
</Target>
|
|
|
|
|
2017-03-24 00:25:40 +00:00
|
|
|
<Target Name="GenerateSdkMSBuildExtensionsNupkg"
|
|
|
|
DependsOnTargets="Init;Layout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
|
|
|
|
Condition=" '$(OS)' == 'Windows_NT'"
|
2017-06-09 18:18:46 +00:00
|
|
|
Inputs="$(MSBuildExtensionsLayoutDirectory)/**/*;
|
2017-03-24 00:25:40 +00:00
|
|
|
$(SdkInstallerNuspecFile);
|
|
|
|
$(SdkGenerateNupkgPowershellScript)"
|
2017-06-09 18:18:46 +00:00
|
|
|
Outputs="$(SdkMSBuildExtensionsNupkgFile);$(SdkMSBuildExtensionsSwrFile)">
|
2017-03-24 00:25:40 +00:00
|
|
|
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript)
|
2017-06-09 18:18:46 +00:00
|
|
|
'$(MSBuildExtensionsLayoutDirectory)'
|
2017-03-24 00:25:40 +00:00
|
|
|
'$(FullNugetVersion)'
|
|
|
|
'$(SdkMSBuildExtensionsNuspecFile)'
|
|
|
|
'$(SdkMSBuildExtensionsNupkgFile)'" />
|
2017-06-09 18:18:46 +00:00
|
|
|
|
|
|
|
<GenerateMSBuildExtensionsSWR MSBuildExtensionsLayoutDirectory="$(MSBuildExtensionsLayoutDirectory)"
|
|
|
|
OutputFile="$(SdkMSBuildExtensionsSwrFile)"/>
|
|
|
|
|
2017-03-24 00:25:40 +00:00
|
|
|
</Target>
|
|
|
|
|
2016-07-26 04:29:59 +00:00
|
|
|
<Target Name="TestSdkMsi"
|
2016-06-28 01:26:57 +00:00
|
|
|
Inputs="$(SdkInstallerFile)"
|
|
|
|
Outputs="$(SdkMsiTestedSentinel)"
|
|
|
|
DependsOnTargets="Init;MsiTargetsSetupInputOutputs;GenerateSdkMsi"
|
|
|
|
Condition=" '$(OS)' == 'Windows_NT'" >
|
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<Exec Command ="powershell -NoProfile -NoLogo $(SdkTestMsiPowershellScript)
|
|
|
|
-InputMsi '$(SdkInstallerFile)'
|
2017-01-05 20:40:23 +00:00
|
|
|
-DotnetDir '$(Stage0Directory)'" />
|
2016-06-28 01:26:57 +00:00
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<WriteLinesToFile
|
|
|
|
File="$(SdkMsiTestedSentinel)"
|
|
|
|
Lines="$(SdkVersion)"
|
|
|
|
Overwrite="true"
|
|
|
|
Encoding="Unicode"/>
|
2016-06-28 01:26:57 +00:00
|
|
|
</Target>
|
|
|
|
|
2016-07-26 04:29:59 +00:00
|
|
|
<Target Name="GenerateMsis"
|
2016-06-28 01:26:57 +00:00
|
|
|
DependsOnTargets="Init;
|
|
|
|
Layout;
|
|
|
|
MsiTargetsSetupInputOutputs;
|
|
|
|
AcquireWix;
|
|
|
|
GenerateSdkMsi;
|
2017-06-27 23:49:34 +00:00
|
|
|
GenerateMSBuildExtensionsMsi;
|
2016-06-28 01:26:57 +00:00
|
|
|
GenerateSdkBundle;
|
2016-10-05 20:53:15 +00:00
|
|
|
GenerateSdkNupkg;
|
2017-03-24 00:25:40 +00:00
|
|
|
GenerateSdkMSBuildExtensionsNupkg;
|
2016-06-28 01:26:57 +00:00
|
|
|
TestSdkMsi"
|
|
|
|
Condition=" '$(OS)' == 'Windows_NT'" />
|
|
|
|
|
|
|
|
<!-- These targets are used in signing, don't remove them! -->
|
2016-08-02 06:22:39 +00:00
|
|
|
<Target Name="ExtractEngineFromSdkBundle"
|
|
|
|
DependsOnTargets="MsiTargetsSetupInputOutputs">
|
2016-08-02 19:59:45 +00:00
|
|
|
<Exec Command="$(WixRoot)/insignia.exe -ib $(CombinedFrameworkSdkHostInstallerFile) -o $(CombinedFrameworkSdkHostBundleEngineName)" />
|
2016-06-28 01:26:57 +00:00
|
|
|
</Target>
|
|
|
|
|
2016-08-02 06:22:39 +00:00
|
|
|
<Target Name="ReattachEngineToSdkBundle"
|
|
|
|
DependsOnTargets="MsiTargetsSetupInputOutputs">
|
2016-08-02 19:59:45 +00:00
|
|
|
<Exec Command="$(WixRoot)/insignia.exe -ab $(CombinedFrameworkSdkHostBundleEngineName) $(CombinedFrameworkSdkHostInstallerFile) -o $(CombinedFrameworkSdkHostInstallerFile)" />
|
2016-06-28 01:26:57 +00:00
|
|
|
</Target>
|
|
|
|
</Project>
|