{"record":{"id":"5ca20431ddb6bfa5","repo":"tauri-apps/tauri","slug":"app-version-build-number-cannot-be-greater-than-65","errorCode":null,"errorMessage":"app version build number cannot be greater than 65535","messagePattern":"app version build number cannot be greater than 65535","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-bundler/src/bundle/windows/msi/mod.rs","lineNumber":335,"sourceCode":"\n  if components.len() < 3 {\n    crate::error::bail!(\n      \"app wix version should be in the format major.minor.patch.build (build is optional)\"\n    );\n  }\n\n  if components[0] > 255 {\n    crate::error::bail!(\"app version major number cannot be greater than 255\");\n  }\n  if components[1] > 255 {\n    crate::error::bail!(\"app version minor number cannot be greater than 255\");\n  }\n  if components[2] > 65535 {\n    crate::error::bail!(\"app version patch number cannot be greater than 65535\");\n  }\n\n  if components.len() == 4 && components[3] > 65535 {\n    crate::error::bail!(\"app version build number cannot be greater than 65535\");\n  }\n\n  Ok(())\n}\n\n// WiX requires versions to be numeric only in a `major.minor.patch.build` format\nfn convert_version(version_str: &str) -> crate::Result<String> {\n  let version = semver::Version::parse(version_str)\n    .map_err(Into::into)\n    .context(\"invalid app version\")?;\n  if !version.build.is_empty() {\n    let build = version.build.parse::<u64>();\n    if build.map(|b| b <= 65535).unwrap_or_default() {\n      return Ok(format!(\n        \"{}.{}.{}.{}\",\n        version.major, version.minor, version.patch, version.build\n      ));\n    } else {","sourceCodeStart":317,"sourceCodeEnd":353,"githubUrl":"https://github.com/tauri-apps/tauri/blob/460ec35447493200d64290dd7f015d5a91d0fd58/crates/tauri-bundler/src/bundle/windows/msi/mod.rs#L317-L353","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before (tauri.conf.json)\n\"version\": \"1.0.0.100000\"\n// after\n\"version\": \"1.0.0.10000\"","handlingStrategy":"validation","validationCode":"fn msi_build_ok(v: &str) -> bool {\n  v.split('.').nth(3)\n    .and_then(|p| p.parse::<u64>().ok())\n    .map(|b| b <= 65535)\n    .unwrap_or(true) // 3-part versions are fine\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = bundle_msi(cfg) {\n  eprintln!(\"msi version invalid: {e}\");\n}","preventionTips":["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"],"tags":["tauri","wix","msi","version","windows"],"backgroundTag":"value-out-of-range","analyzedSha":"460ec35447493200d64290dd7f015d5a91d0fd58","analyzedAt":"2026-09-18T23:55:51.277Z","contentChangedAt":"2026-09-18T23:55:51.277Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}