File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4949 <UpgradeVersion Property =" WIX_DOWNGRADE_DETECTED" Minimum =" $(var.ProductVersion)" IncludeMinimum =" no" OnlyDetect =" yes" />
5050 </Upgrade >
5151 <InstallExecuteSequence >
52- <RemoveExistingProducts After =" InstallExecute" />
52+ <!-- RemoveExistingProducts runs BEFORE InstallInitialize to completely remove old version first.
53+ This prevents DLL conflicts when upgrading across Python versions (e.g., 3.12 to 3.13).
54+ See: https://github.com/Azure/azure-cli/issues/32045 -->
55+ <RemoveExistingProducts Before =" InstallInitialize" />
5356 </InstallExecuteSequence >
5457
5558 <!-- New product architectures should upgrade the original x86 product - even of the same version. -->
7477 <Property Id =" MSIFASTINSTALL" Value =" 7" />
7578 <Property Id =" ApplicationFolderName" Value =" Microsoft SDKs\Azure" />
7679 <Property Id =" WixAppFolder" Value =" WixPerMachineFolder" />
80+
81+ <!-- Force reinstall of all files during upgrade to handle cross-Python-version upgrades.
82+ 'a' = Force reinstall of all files regardless of version
83+ This is necessary because pywin32's .pyd files have version numbers like 3.11.xxx or 3.13.xxx,
84+ and MSI's version comparison may incorrectly determine that older Python version files are "newer".
85+ See: https://github.com/Azure/azure-cli/issues/32045 -->
86+ <SetProperty Id =" REINSTALLMODE" Value =" amus" Before =" CostFinalize" Sequence =" both" >WIX_UPGRADE_DETECTED</SetProperty >
7787
7888 <Feature Id =" ProductFeature"
7989 Title =" Microsoft Azure CLI"
You can’t perform that action at this time.
0 commit comments