85b2a129db
Conflicts: TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj build.proj build/Compile.targets build/Microsoft.DotNet.Cli.Compile.targets build/Microsoft.DotNet.Cli.DependencyVersions.props build/Microsoft.DotNet.Cli.Monikers.props build/Microsoft.DotNet.Cli.Prepare.targets build/package/Microsoft.DotNet.Cli.Nupkg.targets build/package/Nupkg.targets build/test/TestPackageProjects.targets build_projects/dotnet-cli-build/GenerateBuildVersionInfo.cs build_projects/dotnet-cli-build/GetCommitCount.cs build_projects/dotnet-cli-build/dotnet-cli-build.csproj build_projects/shared-build-targets-utils/Utils/BuildVersion.cs src/dotnet-archive/dotnet-archive.csproj src/tool_msbuild/tool_msbuild.csproj src/tool_nuget/tool_nuget.csproj test/ArgumentForwardingTests/ArgumentForwardingTests.csproj test/ArgumentsReflector/ArgumentsReflector.csproj test/EndToEnd/EndToEnd.csproj test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj test/Microsoft.DotNet.ProjectJsonMigration.Tests/Microsoft.DotNet.ProjectJsonMigration.Tests.csproj test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj test/binding-redirects.Tests/binding-redirects.Tests.csproj test/crossgen.Tests/crossgen.Tests.csproj test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj test/dotnet-build.Tests/dotnet-build.Tests.csproj test/dotnet-help.Tests/dotnet-help.Tests.csproj test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj test/dotnet-new.Tests/dotnet-new.Tests.csproj test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj test/dotnet-pack.Tests/dotnet-pack.Tests.csproj test/dotnet-publish.Tests/dotnet-publish.Tests.csproj test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj test/dotnet-restore.Tests/dotnet-restore.Tests.csproj test/dotnet-run.Tests/dotnet-run.Tests.csproj test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj test/dotnet-test.Tests/dotnet-test.Tests.csproj test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj test/dotnet.Tests/dotnet.Tests.csproj test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj tools/Archiver/Archiver.csproj
188 lines
8.7 KiB
XML
188 lines
8.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<Target Name="MsiTargetsSetupInputOutputs" DependsOnTargets="Init">
|
|
<!-- 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>
|
|
<InstallerOutputDirectory>$(PackagesDirectory)</InstallerOutputDirectory>
|
|
|
|
<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>
|
|
|
|
<SdkInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkInstallerFile>
|
|
<CombinedFrameworkSdkHostInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostInstallerFile>
|
|
<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>
|
|
</PropertyGroup>
|
|
|
|
<!-- Generate SDK MSI Inputs -->
|
|
<ItemGroup>
|
|
<GenerateSdkMsiInputs Include="$(SdkLayoutOutputDirectory)/**/*;
|
|
$(SdkGenerateMsiPowershellScript)" />
|
|
</ItemGroup>
|
|
|
|
<!-- Consumed By Publish -->
|
|
<ItemGroup>
|
|
<GeneratedInstallers Include="$(SdkInstallerFile);$(CombinedFrameworkSdkHostInstallerFile)" />
|
|
</ItemGroup>
|
|
|
|
<GenerateMsiVersion CommitCount="$(CommitCount)"
|
|
VersionMajor="$(VersionMajor)"
|
|
VersionMinor="$(VersionMinor)"
|
|
VersionPatch="$(VersionPatch)"
|
|
ReleaseSuffix="$(ReleaseSuffix)">
|
|
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
|
|
</GenerateMsiVersion>
|
|
|
|
<GenerateGuidFromName Name="$(SdkInstallerFile)">
|
|
<Output TaskParameter="OutputGuid"
|
|
PropertyName="SdkInstallerUpgradeCode" />
|
|
</GenerateGuidFromName>
|
|
|
|
<GenerateGuidFromName Name="$(CombinedFrameworkSdkHostInstallerFile)">
|
|
<Output TaskParameter="OutputGuid"
|
|
PropertyName="CombinedFrameworkSDKHostInstallerUpgradeCode" />
|
|
</GenerateGuidFromName>
|
|
|
|
<!-- Test Sdk MSI Properties -->
|
|
<PropertyGroup>
|
|
<SdkTestMsiPowershellScript>$(RepoRoot)/test/Installer/testmsi.ps1</SdkTestMsiPowershellScript>
|
|
<SdkMsiTestedSentinel>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk).MsiTested.sentinel</SdkMsiTestedSentinel>
|
|
</PropertyGroup>
|
|
</Target>
|
|
|
|
<Target Name="AcquireWix"
|
|
DependsOnTargets="Init;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" />
|
|
|
|
<ZipFileExtractToDirectory
|
|
SourceArchive="$(WixDestinationPath)"
|
|
DestinationDirectory="$(WixRoot)" />
|
|
|
|
</Target>
|
|
|
|
<Target Name="GenerateSdkMsi"
|
|
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs"
|
|
Condition=" '$(OS)' == 'Windows_NT'"
|
|
Inputs="@(GenerateSdkMsiInputs)"
|
|
Outputs="$(SdkInstallerFile)">
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateMsiPowershellScript)
|
|
'$(SdkLayoutOutputDirectory)'
|
|
'$(SdkInstallerFile)'
|
|
'$(WixRoot)'
|
|
'$(SdkBrandName)'
|
|
'$(MsiVersion)'
|
|
'$(SimpleVersion)'
|
|
'$(NugetVersion)'
|
|
'$(SdkInstallerUpgradeCode)'
|
|
'$(Architecture)'" />
|
|
</Target>
|
|
|
|
<Target Name="GenerateSdkBundle"
|
|
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs;GenerateSdkMsi"
|
|
Condition=" '$(OS)' == 'Windows_NT'"
|
|
Inputs="$(SdkInstallerFile);
|
|
$(DownloadedSharedFrameworkInstallerFile);
|
|
$(DownloadedHostFxrInstallerFile);
|
|
$(DownloadedSharedHostInstallerFile);
|
|
$(SdkGenerateBundlePowershellScript)"
|
|
Outputs="$(CombinedFrameworkSdkHostInstallerFile)">
|
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateBundlePowershellScript)
|
|
'$(SdkInstallerFile)'
|
|
'$(AdditionalDownloadedSharedFrameworkInstallerFile)'
|
|
'$(AdditionalDownloadedHostFxrInstallerFile)'
|
|
'$(AdditionalDownloadedSharedHostInstallerFile)'
|
|
'$(DownloadedSharedFrameworkInstallerFile)'
|
|
'$(DownloadedHostFxrInstallerFile)'
|
|
'$(DownloadedSharedHostInstallerFile)'
|
|
'$(CombinedFrameworkSdkHostInstallerFile)'
|
|
'$(WixRoot)'
|
|
'$(SdkBrandName)'
|
|
'$(MsiVersion)'
|
|
'$(SimpleVersion)'
|
|
'$(NugetVersion)'
|
|
'$(CombinedFrameworkSDKHostInstallerUpgradeCode)'
|
|
'$(Architecture)'" />
|
|
</Target>
|
|
|
|
<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)'
|
|
'$(FullNugetVersion)'
|
|
'$(SdkInstallerNuspecFile)'
|
|
'$(SdkInstallerNupkgFile)'" />
|
|
</Target>
|
|
|
|
<Target Name="TestSdkMsi"
|
|
Inputs="$(SdkInstallerFile)"
|
|
Outputs="$(SdkMsiTestedSentinel)"
|
|
DependsOnTargets="Init;MsiTargetsSetupInputOutputs;GenerateSdkMsi"
|
|
Condition=" '$(OS)' == 'Windows_NT'" >
|
|
|
|
<Exec Command ="powershell -NoProfile -NoLogo $(SdkTestMsiPowershellScript)
|
|
-InputMsi '$(SdkInstallerFile)'
|
|
-DotnetDir '$(Stage0Directory)'" />
|
|
|
|
<WriteLinesToFile
|
|
File="$(SdkMsiTestedSentinel)"
|
|
Lines="$(SdkVersion)"
|
|
Overwrite="true"
|
|
Encoding="Unicode"/>
|
|
</Target>
|
|
|
|
<Target Name="GenerateMsis"
|
|
DependsOnTargets="Init;
|
|
Layout;
|
|
MsiTargetsSetupInputOutputs;
|
|
AcquireWix;
|
|
GenerateSdkMsi;
|
|
GenerateSdkBundle;
|
|
GenerateSdkNupkg;
|
|
TestSdkMsi"
|
|
Condition=" '$(OS)' == 'Windows_NT'" />
|
|
|
|
<!-- These targets are used in signing, don't remove them! -->
|
|
<Target Name="ExtractEngineFromSdkBundle"
|
|
DependsOnTargets="MsiTargetsSetupInputOutputs">
|
|
<Exec Command="$(WixRoot)/insignia.exe -ib $(CombinedFrameworkSdkHostInstallerFile) -o $(CombinedFrameworkSdkHostBundleEngineName)" />
|
|
</Target>
|
|
|
|
<Target Name="ReattachEngineToSdkBundle"
|
|
DependsOnTargets="MsiTargetsSetupInputOutputs">
|
|
<Exec Command="$(WixRoot)/insignia.exe -ab $(CombinedFrameworkSdkHostBundleEngineName) $(CombinedFrameworkSdkHostInstallerFile) -o $(CombinedFrameworkSdkHostInstallerFile)" />
|
|
</Target>
|
|
</Project>
|