Skip to content

fix(bundler): sanitize WiX binary identifiers (fix: #14681) - #15651

Merged
Legend-Master merged 3 commits into
tauri-apps:devfrom
justjavac:fix/14681-wix-external-bin-id-clean
Jul 6, 2026
Merged

fix(bundler): sanitize WiX binary identifiers (fix: #14681)#15651
Legend-Master merged 3 commits into
tauri-apps:devfrom
justjavac:fix/14681-wix-external-bin-id-clean

Conversation

@justjavac

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Bug fix.

What is the current behavior?

MSI bundling fails when an external binary resolves to a filename that starts with a digit, for example externalBin = [bin/7za] resolving to 7za.exe on Windows.

WiX rejects that value when it is used as a Component/@Id:

error CNDL0014 : The Component/@Id attribute's value, '7za.exe', is not a legal identifier.

Closes #14681.

What is the new behavior?

MSI binary component IDs are normalized as WiX identifiers before rendering the .wxs template. Filenames keep their existing bundle path, but their WiX IDs now:

  • replace - with _
  • keep only ASCII letters, digits, _, and .
  • get a leading _ when the first character is not a letter or _

So 7za.exe is emitted as _7za.exe for WiX while still installing the binary as 7za.exe.

Does this PR introduce a breaking change?

No.

Other information

Validated with:

  • cargo test -p tauri-bundler
  • cargo check -p tauri-bundler
  • cargo clippy -p tauri-bundler --all-targets -- -D warnings
  • cargo fmt --package tauri-bundler -- --check
  • git diff --check
  • End-to-end MSI build on Windows with a temporary Tauri app configured with externalBin = [bin/7za]; WiX candle.exe and light.exe completed successfully and generated an MSI.

@justjavac
justjavac requested a review from a team as a code owner July 5, 2026 03:47
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Package Changes Through 08216cc

There are 14 changes which include tauri-bundler with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri-utils with minor, tauri with minor, tauri-build with minor, tauri-macos-sign with minor, tauri-runtime-wry with minor, tauri-runtime with minor, tauri-codegen with minor, tauri-macros with minor, tauri-plugin with minor, tauri-driver with minor, @tauri-apps/api with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.11.1 2.12.0
tauri-utils 2.9.3 2.10.0
tauri-macos-sign 2.3.4 2.4.0
tauri-bundler 2.9.4 2.10.0
tauri-runtime 2.11.3 2.12.0
tauri-runtime-wry 2.11.4 2.12.0
tauri-codegen 2.6.3 2.7.0
tauri-macros 2.6.3 2.7.0
tauri-plugin 2.6.3 2.7.0
tauri-build 2.6.3 2.7.0
tauri 2.11.5 2.12.0
@tauri-apps/cli 2.11.4 2.12.0
tauri-cli 2.11.4 2.12.0
tauri-driver 2.0.6 2.1.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

Legend-Master
Legend-Master previously approved these changes Jul 6, 2026

@Legend-Master Legend-Master left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Comment thread .changes/fix-wix-external-bin-id.md
@Legend-Master
Legend-Master merged commit adf5acf into tauri-apps:dev Jul 6, 2026
2 checks passed
Proksima pushed a commit to Proksima/tauri that referenced this pull request Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]🐞: MSI build fails on Windows when externalBin is configured

2 participants