DioxusLabs/dioxus · error · anyhow::Error

WiX fragment file not found

Error message

WiX fragment file not found: {}

What it means

bundle_windows_msi referenced a WiX fragment file path from wix_settings.fragment_paths that does not exist on disk. The MSI build cannot compile without all declared fragments, so the bundler bails with the missing path.

Solutions

  1. The WiX fragment file is missing. Regenerate the bundle configuration or restore the fragment file.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/cli/src/bundler/windows.rs:236 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23). Data as JSON: /api/errors/f8fbe29d72274dc8. Report an issue: GitHub.

Appendix: source

Thrown at packages/cli/src/bundler/windows.rs:236

                    "Failed to read custom WiX template: {}",
                    template_path.display()
                )
            })?
        } else {
            WIX_TEMPLATE.to_string()
        };

        let wxs_content =
            render_template(&wix_template, &data).context("Failed to render WiX template")?;

        let wxs_path = output_dir.join(format!("{product_name}.wxs"));
        std::fs::write(&wxs_path, &wxs_content).context("Failed to write WiX source file")?;

        let mut fragment_wxs_paths = Vec::new();
        for fragment in &wix_settings.fragment_paths {
            let frag_path = self.crate_dir().join(fragment);
            if !frag_path.exists() {
                bail!("WiX fragment file not found: {}", frag_path.display());
            }
            fragment_wxs_paths.push(frag_path);
        }

        tracing::info!("Running candle.exe to compile WiX source...");
        let wixobj_path = output_dir.join(format!("{product_name}.wixobj"));

        let mut candle_cmd = Command::new(&candle);
        candle_cmd
            .arg("-arch")
            .arg(wix_arch)
            .arg("-o")
            .arg(&wixobj_path)
            .arg(&wxs_path);

        if wix_settings.fips_compliant {
            candle_cmd.arg("-fips");
        }

View on GitHub (pinned to 24f6a829df)