A past issue affected Windows users upgrading the Azure CLI via MSI installer from version 2.76.0 or earlier to 2.77.0 or later. This upgrade caused an immediate crash on startup with an ImportError related to a missing win32file DLL. The problem primarily impacted users who upgraded without a full uninstall, while clean installations typically worked without issue. The root cause was an interaction between Windows Installer's file versioning rules and a change in a third-party dependency, pywin32. Newer pywin32 binaries lacked Windows version resource metadata, leading MSI to incorrectly prioritize older, versioned binaries. During the upgrade, MSI could remove the necessary new files while failing to install them, resulting in an incomplete installation. This left critical Python extension files missing from the Azure CLI installation directory. To recover, users were advised to upgrade to the latest version or perform a clean reinstall. The MSI upgrade process has since been optimized to skip per-file version comparisons and instead perform a streamlined overwrite installation. This optimization makes upgrades significantly faster and more reliable. It achieves this by removing old files first and removing slow, per-file version checks. Users are encouraged to upgrade to the latest Azure CLI version to resolve the issue and benefit from improved installation performance. Any further problems can be reported on the Azure CLI GitHub.
techcommunity.microsoft.com
techcommunity.microsoft.com
