{"record":{"id":"158edf84e81088e4","repo":"tauri-apps/tauri","slug":"app-version-minor-number-cannot-be-greater-than-25","errorCode":null,"errorMessage":"app version minor number cannot be greater than 255","messagePattern":"app version minor number cannot be greater than 255","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-bundler/src/bundle/windows/msi/mod.rs","lineNumber":328,"sourceCode":"}\n\nfn validate_wix_version(version_str: &str) -> crate::Result<()> {\n  let components = version_str\n    .split('.')\n    .flat_map(|c| c.parse::<u64>().ok())\n    .collect::<Vec<_>>();\n\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() {","sourceCodeStart":310,"sourceCodeEnd":346,"githubUrl":"https://github.com/tauri-apps/tauri/blob/460ec35447493200d64290dd7f015d5a91d0fd58/crates/tauri-bundler/src/bundle/windows/msi/mod.rs#L310-L346","documentation":"Validation guard in validate_wix_version: the minor component of the app version being bundled into an MSI exceeds 255. WiX/MSI ProductVersion fields are bounded per segment (max 255 for major/minor), so a version like 1.300.0 would produce an invalid MSI and is rejected before the WiX build runs.","triggerScenarios":"Bundling an msi whose app version minor number is 256 or greater — e.g. version \"1.300.0\" in tauri.conf.json — during build_wix_app_installer.","commonSituations":"Auto-incrementing CI version scripts that bump minor endlessly; using large build counters in the minor slot; mechanically converted internal version schemes (e.g. \"1.512.3\").","solutions":["Lower the minor version component to 255 or below in tauri.conf.json","Move high counters into the patch (≤65535) or build (4th, ≤65535) field instead","Fix the CI/version-bump script so the minor field resets/rolls over within range"],"exampleFix":"// before (tauri.conf.json)\n\"version\": \"1.300.0\"\n// after\n\"version\": \"2.0.0\"","handlingStrategy":"validation","validationCode":"fn msi_minor_ok(v: &str) -> bool {\n  v.split('.').nth(1)\n    .and_then(|p| p.parse::<u64>().ok())\n    .map(|m| m <= 255)\n    .unwrap_or(false)\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = bundle_msi(cfg) {\n  eprintln!(\"msi version invalid: {e}\");\n}","preventionTips":["Cap auto-increment scripts at minor ≤ 255 and roll over into patch","Keep counters in the patch/build fields, which allow larger values","Lint tauri.conf.json version ranges in CI"],"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"}