tauri-apps/tauri · error
app version build number cannot be greater than 65535
Error message
app version build number cannot be greater than 65535
What it means
Validation guard in validate_wix_version: the optional fourth build component of the app version exceeds 65535, which is the maximum allowed for the build segment of an MSI ProductVersion. Only fires when the version string has exactly 4 components.
Solutions
- Lower the 4th version component to 65535 or below in tauri.conf.json
- Drop the 4th component entirely (three-part versions are accepted)
- Remap the build counter (e.g. modulo 65536) in the packaging script
Example fix
// before (tauri.conf.json) "version": "1.0.0.100000" // after "version": "1.0.0.10000"
Defensive patterns
Strategy: validation
Validate before calling
fn msi_build_ok(v: &str) -> bool {
v.split('.').nth(3)
.and_then(|p| p.parse::<u64>().ok())
.map(|b| b <= 65535)
.unwrap_or(true) // 3-part versions are fine
} Try / catch
if let Err(e) = bundle_msi(cfg) {
eprintln!("msi version invalid: {e}");
} Prevention
- Keep 4th version components ≤ 65535 or drop them entirely
- Centralize version assembly so Windows limits are applied once
- Test bundle with a dry-run before official Windows releases
When it happens
Trigger: Bundling an msi with a four-part app version whose build number is 65536 or greater — e.g. "1.0.0.100000" in tauri.conf.json — during build_wix_app_installer.
Common situations: Windows-style versioning scripts that inject a large FILEVERSION/build counter as the 4th part; reusing a non-Windows build number that has already exceeded 65535.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- app version major number cannot be greater than 255
- app version minor number cannot be greater than 255
- app version patch number cannot be greater than 65535
- app wix version should be in the format…
- optional build metadata in app version must be numeric-only…
AI-assisted analysis of tauri-apps/tauri@460ec35447 (2026-09-18).
Data as JSON: /api/errors/5ca20431ddb6bfa5.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tauri-bundler/src/bundle/windows/msi/mod.rs:335
if components.len() < 3 {
crate::error::bail!(
"app wix version should be in the format major.minor.patch.build (build is optional)"
);
}
if components[0] > 255 {
crate::error::bail!("app version major number cannot be greater than 255");
}
if components[1] > 255 {
crate::error::bail!("app version minor number cannot be greater than 255");
}
if components[2] > 65535 {
crate::error::bail!("app version patch number cannot be greater than 65535");
}
if components.len() == 4 && components[3] > 65535 {
crate::error::bail!("app version build number cannot be greater than 65535");
}
Ok(())
}
// WiX requires versions to be numeric only in a `major.minor.patch.build` format
fn convert_version(version_str: &str) -> crate::Result<String> {
let version = semver::Version::parse(version_str)
.map_err(Into::into)
.context("invalid app version")?;
if !version.build.is_empty() {
let build = version.build.parse::<u64>();
if build.map(|b| b <= 65535).unwrap_or_default() {
return Ok(format!(
"{}.{}.{}.{}",
version.major, version.minor, version.patch, version.build
));
} else {View on GitHub (pinned to 460ec35447)