{"record":{"id":"a8b022841735ed87","repo":"tauri-apps/tauri","slug":"optional-pre-release-identifier-in-app-version-mus","errorCode":null,"errorMessage":"optional pre-release identifier in app version must be numeric-only and cannot be greater than 65535 for msi target","messagePattern":"optional pre-release identifier in app version must be numeric-only and cannot be greater than 65535 for msi target","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-bundler/src/bundle/windows/msi/mod.rs","lineNumber":368,"sourceCode":"        \"{}.{}.{}.{}\",\n        version.major, version.minor, version.patch, version.build\n      ));\n    } else {\n      crate::error::bail!(\n        \"optional build metadata in app version must be numeric-only and cannot be greater than 65535 for msi target\"\n      );\n    }\n  }\n\n  if !version.pre.is_empty() {\n    let pre = version.pre.parse::<u64>();\n    if pre.is_ok() && pre.unwrap() <= 65535 {\n      return Ok(format!(\n        \"{}.{}.{}.{}\",\n        version.major, version.minor, version.patch, version.pre\n      ));\n    } else {\n      crate::error::bail!(\n        \"optional pre-release identifier in app version must be numeric-only and cannot be greater than 65535 for msi target\"\n      );\n    }\n  }\n\n  Ok(version_str.to_string())\n}\n\n/// Runs the Candle.exe executable for Wix. Candle parses the wxs file and generates the code for building the installer.\nfn run_candle(\n  settings: &Settings,\n  wix_toolset_path: &Path,\n  cwd: &Path,\n  wxs_file_path: PathBuf,\n  extensions: Vec<PathBuf>,\n) -> crate::Result<()> {\n  let arch = match settings.binary_arch() {\n    Arch::X86_64 => \"x64\",","sourceCodeStart":350,"sourceCodeEnd":386,"githubUrl":"https://github.com/tauri-apps/tauri/blob/460ec35447493200d64290dd7f015d5a91d0fd58/crates/tauri-bundler/src/bundle/windows/msi/mod.rs#L350-L386","documentation":"convert_version in the WiX MSI bundler can represent a semver pre-release only if the pre-release identifier parses as a single number ≤ 65535, which it then appends as the 4th MSI field. Any other pre-release (e.g. \"beta\", \"rc.1\", or a number above 65535) fails this check and bails, because MSI versions must be purely numeric.","triggerScenarios":"Bundling an msi with a version like \"1.2.3-beta\", \"1.2.3-rc.1\", or \"1.2.3-70000\" — a pre-release identifier that is non-numeric or exceeds 65535 — via build_wix_app_installer.","commonSituations":"Publishing beta/RC builds to Windows testers (\"2.0.0-beta.3\"); release channels using textual pre-release tags; semver pre-releases with multiple dot-separated identifiers.","solutions":["Use a purely numeric pre-release ≤ 65535 (e.g. \"2.0.0-3\") if you need MSI pre-release versions","Drop the pre-release tag for msi builds (\"2.0.0\") and track the channel elsewhere","Normalize the version in CI: map textual pre-releases (beta, rc) to numeric equivalents before tauri build"],"exampleFix":"// before (tauri.conf.json)\n\"version\": \"2.0.0-beta.3\"\n// after\n\"version\": \"2.0.0-3\"","handlingStrategy":"validation","validationCode":"fn msi_prerelease_ok(v: &str) -> bool {\n  match v.split_once('-') {\n    None => true,\n    Some((_, pre)) => {\n      let pre = pre.split('+').next().unwrap_or(\"\");\n      pre.parse::<u64>().map(|n| n <= 65535).unwrap_or(false)\n    }\n  }\n}","typeGuard":null,"tryCatchPattern":"match bundle_msi(cfg) {\n  Err(e) if e.to_string().contains(\"pre-release\") => eprintln!(\"use numeric pre-release or drop it for msi\"),\n  Err(e) => eprintln!(\"bundling failed: {e}\"),\n  Ok(_) => {},\n}","preventionTips":["For MSI pre-releases use numeric-only tags like \"1.2.3-1\"","Drop textual tags (beta/rc) for msi targets and encode the channel in the product name","Normalize versions in CI with a mapping step before bundling"],"tags":["tauri","wix","msi","semver","version"],"backgroundTag":"invalid-argument-format","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"}