From 495e46c0e049908e28d753e15142e22ad0465c68 Mon Sep 17 00:00:00 2001 From: Nikola Milosavljevic Date: Tue, 16 Dec 2025 12:48:16 -0800 Subject: [PATCH 1/6] Initial changes --- eng/Version.Details.xml | 4 + eng/Versions.props | 2 + global.json | 3 +- src/redist/redist.csproj | 8 +- src/redist/targets/GenerateMSIs.targets | 36 +---- .../windows/dotnetCoreUninstall/dotnet.wxs | 74 +++++---- .../dotnetCoreUninstall/generatemsi.ps1 | 144 ------------------ .../windows/dotnetCoreUninstall/provider.wxs | 7 +- .../uninstall-tool.wixproj | 67 ++++++++ .../windows/dotnetCoreUninstall/variables.wxi | 11 +- 10 files changed, 132 insertions(+), 224 deletions(-) delete mode 100644 src/redist/targets/packaging/windows/dotnetCoreUninstall/generatemsi.ps1 create mode 100644 src/redist/targets/packaging/windows/dotnetCoreUninstall/uninstall-tool.wixproj diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 66e9b6fe..9763e624 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -7,5 +7,9 @@ https://github.com/dotnet/arcade 846929727a388f2b1fd3ccf21f67694f44b91b4d + + https://github.com/dotnet/dotnet + 846929727a388f2b1fd3ccf21f67694f44b91b4d + diff --git a/eng/Versions.props b/eng/Versions.props index bf4e3277..d179ca90 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -15,5 +15,7 @@ 13.0.1 3.2.2146 9.3.3 + 11.0.0-beta.25578.1 + 5.0.2-dotnet.2811440 diff --git a/global.json b/global.json index cc22ff6b..32dccc1d 100644 --- a/global.json +++ b/global.json @@ -8,6 +8,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.25578.1" + "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.25578.1", + "Microsoft.WixToolset.Sdk": "5.0.2-dotnet.2811440" } } diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index 759ab143..35d5e98d 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -9,7 +9,13 @@ - + + + + + + diff --git a/src/redist/targets/GenerateMSIs.targets b/src/redist/targets/GenerateMSIs.targets index 1b568b0d..05485d38 100644 --- a/src/redist/targets/GenerateMSIs.targets +++ b/src/redist/targets/GenerateMSIs.targets @@ -75,34 +75,14 @@ Inputs="$(DotnetCoreUninstallOutputDirectory)**/*; $(DotnetCoreUninstallGenerateMsiPowershellScript)" Outputs="$(DotnetCoreUninstallMSIInstallerFile)"> - - - - $(ArtifactsObjDir)/LightCommandPackages - - $(ArtifactsShippingPackagesDir) - - - - - - - + diff --git a/src/redist/targets/packaging/windows/dotnetCoreUninstall/dotnet.wxs b/src/redist/targets/packaging/windows/dotnetCoreUninstall/dotnet.wxs index 0823b069..3983e991 100644 --- a/src/redist/targets/packaging/windows/dotnetCoreUninstall/dotnet.wxs +++ b/src/redist/targets/packaging/windows/dotnetCoreUninstall/dotnet.wxs @@ -1,16 +1,15 @@ - - + - - + + - + - + - + @@ -18,26 +17,19 @@ - + - + - - - - - - - - - + + - + @@ -62,35 +54,39 @@ - 1 - "1"]]> + + - 1 + - NOT Installed - Installed AND PATCH + + - 1 - 1 - NOT WIXUI_DONTVALIDATEPATH - "1"]]> - WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1" - 1 - 1 + + + + + + + - NOT Installed - Installed AND NOT PATCH - Installed AND PATCH + + + - 1 + - 1 - 1 - 1 + + + - + + + + + diff --git a/src/redist/targets/packaging/windows/dotnetCoreUninstall/generatemsi.ps1 b/src/redist/targets/packaging/windows/dotnetCoreUninstall/generatemsi.ps1 deleted file mode 100644 index 419e0f7b..00000000 --- a/src/redist/targets/packaging/windows/dotnetCoreUninstall/generatemsi.ps1 +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. - -param( - [Parameter(Mandatory=$true)][string]$inputDir, - [Parameter(Mandatory=$true)][string]$DotnetMSIOutput, - [Parameter(Mandatory=$true)][string]$WixRoot, - [Parameter(Mandatory=$true)][string]$ProductMoniker, - [Parameter(Mandatory=$true)][string]$DotnetMSIVersion, - [Parameter(Mandatory=$true)][string]$UpgradeCode, - [Parameter(Mandatory=$true)][string]$Architecture -) - -$InstallFileswsx = ".\install-files.wxs" -$InstallFilesWixobj = "install-files.wixobj" - -function RunHeat -{ - $result = $true - pushd "$WixRoot" - - Write-Information "Running heat.." - - $heatOutput = .\heat.exe dir `"$inputDir`" -template fragment ` - -sreg -gg ` - -var var.DotnetSrc ` - -cg InstallFiles ` - -srd ` - -dr DOTNETDOTNETCOREUNINSTALLHOME ` - -out install-files.wxs - - Write-Information "Heat output: $heatOutput" - - if($LastExitCode -ne 0) - { - $result = $false - Write-Information "Heat failed with exit code $LastExitCode." - } - - popd - Write-Information "RunHeat result: $result" - return $result -} - -function RunCandle -{ - $result = $true - pushd "$WixRoot" - - Write-Information "Running candle.." - - $candleOutput = .\candle.exe -nologo ` - -dDotnetSrc="$inputDir" ` - -dProductMoniker="$ProductMoniker" ` - -dBuildVersion="$DotnetMSIVersion" ` - -dUpgradeCode="$UpgradeCode" ` - -arch "$Architecture" ` - -ext WixDependencyExtension.dll ` - "$PSScriptRoot\dotnet.wxs" ` - "$PSScriptRoot\provider.wxs" ` - $InstallFileswsx - - Write-Information "Candle output: $candleOutput" - - if($LastExitCode -ne 0) - { - $result = $false - Write-Information "Candle failed with exit code $LastExitCode." - } - - popd - return $result -} - -function RunLight -{ - $result = $true - pushd "$WixRoot" - - Write-Information "Running light.." - $CabCache = Join-Path $WixRoot "cabcache" - - $lightOutput = .\light.exe -nologo -ext WixUIExtension -ext WixDependencyExtension -ext WixUtilExtension ` - -cultures:en-us ` - dotnet.wixobj ` - provider.wixobj ` - $InstallFilesWixobj ` - -b "$inputDir" ` - -b "$PSScriptRoot" ` - -reusecab ` - -cc "$CabCache" ` - -out $DotnetMSIOutput - - Write-Information "Light output: $lightOutput" - - if($LastExitCode -ne 0) - { - $result = $false - Write-Information "Light failed with exit code $LastExitCode." - } - - popd - return $result -} - -if(!(Test-Path $inputDir)) -{ - throw "$inputDir not found" -} - -Write-Information "Creating dotnet MSI at $DotnetMSIOutput" - -if([string]::IsNullOrEmpty($WixRoot)) -{ - Exit -1 -} - -if(-Not (RunHeat)) -{ - Write-Information "Heat failed" - Exit -1 -} - -if(-Not (RunCandle)) -{ - Write-Information "Candle failed" - Exit -1 -} - -if(-Not (RunLight)) -{ - Write-Information "Light failed" - Exit -1 -} - -if(!(Test-Path $DotnetMSIOutput)) -{ - throw "Unable to create the dotnet msi." - Exit -1 -} - -Write-Information "Successfully created dotnet MSI - $DotnetMSIOutput" - -exit $LastExitCode diff --git a/src/redist/targets/packaging/windows/dotnetCoreUninstall/provider.wxs b/src/redist/targets/packaging/windows/dotnetCoreUninstall/provider.wxs index e1711ec7..197ef5e3 100644 --- a/src/redist/targets/packaging/windows/dotnetCoreUninstall/provider.wxs +++ b/src/redist/targets/packaging/windows/dotnetCoreUninstall/provider.wxs @@ -1,9 +1,8 @@ - - + - - + + diff --git a/src/redist/targets/packaging/windows/dotnetCoreUninstall/uninstall-tool.wixproj b/src/redist/targets/packaging/windows/dotnetCoreUninstall/uninstall-tool.wixproj new file mode 100644 index 00000000..cbbb090a --- /dev/null +++ b/src/redist/targets/packaging/windows/dotnetCoreUninstall/uninstall-tool.wixproj @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + $(DefineConstants);DependencyKeyName=Dotnet_Uninstall_Tool + $(DefineConstants);DotnetSrc=$(DotnetSrc) + $(DefineConstants);BuildVersion=$(DotnetMSIVersion) + $(DefineConstants);ProductMoniker=$(ProductMoniker) + $(DefineConstants);UpgradeCode=$(UpgradeCode) + $(DefineConstants);TargetArchitecture=$(TargetArchitecture) + + + + + full + + $(TargetArchitecture) + $(InstallerPlatform) + $(InstallerPlatform) + + + + + + $(IntermediateOutputPath)wixpack + $(ArtifactsNonShippingPackagesDir) + + + + + + + + diff --git a/src/redist/targets/packaging/windows/dotnetCoreUninstall/variables.wxi b/src/redist/targets/packaging/windows/dotnetCoreUninstall/variables.wxi index 1fdd9c97..bf4798c4 100644 --- a/src/redist/targets/packaging/windows/dotnetCoreUninstall/variables.wxi +++ b/src/redist/targets/packaging/windows/dotnetCoreUninstall/variables.wxi @@ -14,21 +14,18 @@ - - + - - + - - + - + From 0280dfb26308f0a7a0b75e5b9cec41d305b5fe17 Mon Sep 17 00:00:00 2001 From: Nikola Milosavljevic Date: Wed, 17 Dec 2025 10:23:18 -0800 Subject: [PATCH 2/6] Suppress ICE validation --- .../windows/dotnetCoreUninstall/uninstall-tool.wixproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/redist/targets/packaging/windows/dotnetCoreUninstall/uninstall-tool.wixproj b/src/redist/targets/packaging/windows/dotnetCoreUninstall/uninstall-tool.wixproj index cbbb090a..46d8a78e 100644 --- a/src/redist/targets/packaging/windows/dotnetCoreUninstall/uninstall-tool.wixproj +++ b/src/redist/targets/packaging/windows/dotnetCoreUninstall/uninstall-tool.wixproj @@ -36,6 +36,8 @@ $(TargetArchitecture) $(InstallerPlatform) $(InstallerPlatform) + + true From ecfea5500db87ef3f7d729e6895be007c45633fd Mon Sep 17 00:00:00 2001 From: Nikola Milosavljevic Date: Wed, 17 Dec 2025 10:24:15 -0800 Subject: [PATCH 3/6] Remove wix3 references --- src/redist/targets/GenerateMSIs.targets | 35 +------------------------ 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/src/redist/targets/GenerateMSIs.targets b/src/redist/targets/GenerateMSIs.targets index 05485d38..1f21566b 100644 --- a/src/redist/targets/GenerateMSIs.targets +++ b/src/redist/targets/GenerateMSIs.targets @@ -9,15 +9,6 @@ - - - 3.14.1.8722 - https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/wix/Microsoft.Signed.Wix-$(WixVersion).zip - $(ArtifactsDir)Tools/WixTools/$(WixVersion) - $(WixRoot)/WixTools.$(WixVersion).zip - $(WixRoot)/WixDownload.$(WixVersion).sentinel - - $(MSBuildThisFileDirectory)packaging/windows/dotnetCoreUninstall/generatemsi.ps1 @@ -45,32 +36,8 @@ - - - - - - - - - - - - Date: Wed, 17 Dec 2025 11:59:45 -0800 Subject: [PATCH 4/6] Minor formatting fixes --- .../windows/dotnetCoreUninstall/dotnet.wxs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/redist/targets/packaging/windows/dotnetCoreUninstall/dotnet.wxs b/src/redist/targets/packaging/windows/dotnetCoreUninstall/dotnet.wxs index 3983e991..25cede27 100644 --- a/src/redist/targets/packaging/windows/dotnetCoreUninstall/dotnet.wxs +++ b/src/redist/targets/packaging/windows/dotnetCoreUninstall/dotnet.wxs @@ -2,7 +2,6 @@ - @@ -17,9 +16,11 @@ + + @@ -27,7 +28,9 @@ - + + + @@ -85,8 +88,9 @@ - - - - + + + + + From 4de9dd09200b6192b8914fa6eafe5be594d8e86f Mon Sep 17 00:00:00 2001 From: Nikola Milosavljevic Date: Wed, 17 Dec 2025 22:42:30 -0800 Subject: [PATCH 5/6] Fix merge issue --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 8e288ae0..38b18b74 100644 --- a/global.json +++ b/global.json @@ -8,7 +8,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.25605.2" + "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.25605.2", "Microsoft.WixToolset.Sdk": "5.0.2-dotnet.2811440" } } From a3468fc955a3687a5ef19c4124b2714bc6284f37 Mon Sep 17 00:00:00 2001 From: Nikola Milosavljevic Date: Thu, 18 Dec 2025 11:33:33 -0800 Subject: [PATCH 6/6] Remove unnecessary comment --- .../packaging/windows/dotnetCoreUninstall/uninstall-tool.wixproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/redist/targets/packaging/windows/dotnetCoreUninstall/uninstall-tool.wixproj b/src/redist/targets/packaging/windows/dotnetCoreUninstall/uninstall-tool.wixproj index 46d8a78e..44e3fa06 100644 --- a/src/redist/targets/packaging/windows/dotnetCoreUninstall/uninstall-tool.wixproj +++ b/src/redist/targets/packaging/windows/dotnetCoreUninstall/uninstall-tool.wixproj @@ -19,7 +19,6 @@ - $(DefineConstants);DependencyKeyName=Dotnet_Uninstall_Tool $(DefineConstants);DotnetSrc=$(DotnetSrc) $(DefineConstants);BuildVersion=$(DotnetMSIVersion)