You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MSI doesn't upgrade previous versions with the default configuration #504
With the default configuration, a new MSI doesn't upgrade a previously installed version of the app.
Where
WindowsConfig.setDefaults() (line 355): msiUpgradeCode defaults to UUID.randomUUID(), a new value on every build. Windows Installer only upgrades products with the same UpgradeCode, so every MSI is a different product.
productVersion, which is the MSI Version, defaults to 1.0.0.0 and isn't derived from version, so even with a fixed upgrade code, MajorUpgrade (AllowSameVersionUpgrades="no") refuses to replace the installed version.
Possible fix
Derive a stable default msiUpgradeCode from the app (e.g. a name-based UUID from organizationName and name), and log the value so it can be pinned.
Default productVersion/fileVersion to version turned into x.x.x.x when it's numeric.
Workaround
Set a fixed winConfig.msiUpgradeCode and increase winConfig.productVersion in every release (documented in Windows).
msiUpgradeCode now defaults to a stable GUID derived from organizationName and name (the build logs it), so a new MSI upgrades the installed version.
productVersion and fileVersion default to version as x.x.x.x (e.g. 2.1.0-SNAPSHOT becomes 2.1.0.0), or 1.0.0.0 with a warning if it doesn't fit an MSI version.
Installing the same version again replaces it (AllowSameVersionUpgrades).
The Windows smoke tests build the MSI with WiX 5; the upgrade itself isn't tested in CI, so feedback is welcome.
It will ship in 2.0.1, and I'll close this issue then.
How to test 2.0.1-SNAPSHOT
Important
Since 2.0.0 the groupId, the Gradle plugin id and the Java packages are io.github.javapackager (see Upgrading to 2.0).
Maven, add the snapshots repository and use the snapshot version:
Activity
Fix the bugs found while documenting 2.0.0
fvarrui commentedon Oct 11, 2026
Fixed in
devel(29e3392):msiUpgradeCodenow defaults to a stable GUID derived fromorganizationNameandname(the build logs it), so a new MSI upgrades the installed version.productVersionandfileVersiondefault toversionasx.x.x.x(e.g.2.1.0-SNAPSHOTbecomes2.1.0.0), or1.0.0.0with a warning if it doesn't fit an MSI version.AllowSameVersionUpgrades).The Windows smoke tests build the MSI with WiX 5; the upgrade itself isn't tested in CI, so feedback is welcome.
It will ship in 2.0.1, and I'll close this issue then.
How to test
2.0.1-SNAPSHOTImportant
Since 2.0.0 the
groupId, the Gradle plugin id and the Java packages areio.github.javapackager(see Upgrading to 2.0).Maven, add the snapshots repository and use the snapshot version:
Gradle, add the snapshots repository in
settings.gradle:pluginManagement { repositories { maven { url = 'https://central.sonatype.com/repository/maven-snapshots/' } gradlePluginPortal() } }and use the snapshot version in
build.gradle:plugins { id 'io.github.javapackager' version '2.0.1-SNAPSHOT' }See Snapshot versions for more.