From eee611e9acbf7e70b1dcd13a6041e1c0c05fbac5 Mon Sep 17 00:00:00 2001 From: libokai Date: Tue, 18 Aug 2026 09:45:21 +0000 Subject: [PATCH 1/4] feat(cli): warn when productName is left as the default (fix #14968) The default productName tauri-app is used to derive the default WiX installer upgrade code, so every app published without changing it gets the same upgrade code and collides with unrelated apps in winget. tauri build now warns when productName is still tauri-app, and the config docs for productName and identifier explain what must be changed before publishing. The upgrade code derivation itself is unchanged. --- .changes/default-product-name-warning.md | 6 ++++++ crates/tauri-cli/config.schema.json | 4 ++-- crates/tauri-cli/src/build.rs | 6 ++++++ crates/tauri-schema-generator/schemas/config.schema.json | 4 ++-- crates/tauri-utils/src/config.rs | 7 +++++++ 5 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 .changes/default-product-name-warning.md diff --git a/.changes/default-product-name-warning.md b/.changes/default-product-name-warning.md new file mode 100644 index 000000000000..50d55dc70597 --- /dev/null +++ b/.changes/default-product-name-warning.md @@ -0,0 +1,6 @@ +--- +"tauri-cli": patch:enhance +"tauri-utils": patch:enhance +--- + +`tauri build` now warns when `productName` is still set to the default `tauri-app`, since it is used to derive the default Windows installer (WiX) upgrade code, which must be unique across applications. The config documentation for `productName` and `identifier` was updated accordingly. diff --git a/crates/tauri-cli/config.schema.json b/crates/tauri-cli/config.schema.json index 84de6c1bebc0..ae590eb1c409 100644 --- a/crates/tauri-cli/config.schema.json +++ b/crates/tauri-cli/config.schema.json @@ -16,7 +16,7 @@ ] }, "productName": { - "description": "App name.", + "description": "App name.\n\n Make sure to change this from the default `tauri-app` before publishing your app.\n On Windows it is used to derive the default WiX installer upgrade code,\n which must be unique across applications and can be set explicitly with the\n [`bundle > windows > wix > upgradeCode`](WixConfig::upgrade_code) setting.", "type": [ "string", "null" @@ -38,7 +38,7 @@ ] }, "identifier": { - "description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`).\n This string must be unique across applications since it is used in system configurations like\n the bundle ID and path to the webview data directory.\n This string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-),\n and periods (.).", + "description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`).\n This string must be unique across applications since it is used in system configurations like\n the bundle ID and path to the webview data directory.\n This string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-),\n and periods (.).\n The default value `com.tauri.dev` is rejected by `tauri build` and must be changed before\n building your application.", "type": "string" }, "app": { diff --git a/crates/tauri-cli/src/build.rs b/crates/tauri-cli/src/build.rs index 557433e5c744..8ca1ebd224aa 100644 --- a/crates/tauri-cli/src/build.rs +++ b/crates/tauri-cli/src/build.rs @@ -193,6 +193,12 @@ pub fn setup( ); } + if config.product_name.as_deref() == Some("tauri-app") { + log::warn!( + "The `productName` is still set to the default value `tauri-app`. You should change it before publishing your app since it is used to derive the default Windows installer (WiX) upgrade code, which must be unique across applications." + ); + } + if let Some(before_build) = config.build.before_build_command.clone() { helpers::run_hook( "beforeBuildCommand", diff --git a/crates/tauri-schema-generator/schemas/config.schema.json b/crates/tauri-schema-generator/schemas/config.schema.json index 84de6c1bebc0..ae590eb1c409 100644 --- a/crates/tauri-schema-generator/schemas/config.schema.json +++ b/crates/tauri-schema-generator/schemas/config.schema.json @@ -16,7 +16,7 @@ ] }, "productName": { - "description": "App name.", + "description": "App name.\n\n Make sure to change this from the default `tauri-app` before publishing your app.\n On Windows it is used to derive the default WiX installer upgrade code,\n which must be unique across applications and can be set explicitly with the\n [`bundle > windows > wix > upgradeCode`](WixConfig::upgrade_code) setting.", "type": [ "string", "null" @@ -38,7 +38,7 @@ ] }, "identifier": { - "description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`).\n This string must be unique across applications since it is used in system configurations like\n the bundle ID and path to the webview data directory.\n This string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-),\n and periods (.).", + "description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`).\n This string must be unique across applications since it is used in system configurations like\n the bundle ID and path to the webview data directory.\n This string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-),\n and periods (.).\n The default value `com.tauri.dev` is rejected by `tauri build` and must be changed before\n building your application.", "type": "string" }, "app": { diff --git a/crates/tauri-utils/src/config.rs b/crates/tauri-utils/src/config.rs index 57fd3dcd3a54..17763fbc01c0 100644 --- a/crates/tauri-utils/src/config.rs +++ b/crates/tauri-utils/src/config.rs @@ -3744,6 +3744,11 @@ pub struct Config { #[serde(rename = "$schema")] pub schema: Option, /// App name. + /// + /// Make sure to change this from the default `tauri-app` before publishing your app. + /// On Windows it is used to derive the default WiX installer upgrade code, + /// which must be unique across applications and can be set explicitly with the + /// [`bundle > windows > wix > upgradeCode`](WixConfig::upgrade_code) setting. #[serde(alias = "product-name")] #[cfg_attr(feature = "schema", validate(regex(pattern = "^[^/\\:*?\"<>|]+$")))] pub product_name: Option, @@ -3784,6 +3789,8 @@ pub struct Config { /// the bundle ID and path to the webview data directory. /// This string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-), /// and periods (.). + /// The default value `com.tauri.dev` is rejected by `tauri build` and must be changed before + /// building your application. pub identifier: String, /// The App configuration. #[serde(default)] From 91d211586c0e90f6337f325d5a1e73b3ab5a5cc5 Mon Sep 17 00:00:00 2001 From: libokai Date: Wed, 19 Aug 2026 03:31:34 +0000 Subject: [PATCH 2/4] docs(config): document the full surface of productName The productName doc now lists everything the field controls on each platform instead of focusing on the WiX upgrade code. Requested in review of #15895. --- crates/tauri-cli/config.schema.json | 2 +- .../schemas/config.schema.json | 2 +- crates/tauri-utils/src/config.rs | 19 +++++++++++++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/crates/tauri-cli/config.schema.json b/crates/tauri-cli/config.schema.json index ae590eb1c409..8878f5f19e24 100644 --- a/crates/tauri-cli/config.schema.json +++ b/crates/tauri-cli/config.schema.json @@ -16,7 +16,7 @@ ] }, "productName": { - "description": "App name.\n\n Make sure to change this from the default `tauri-app` before publishing your app.\n On Windows it is used to derive the default WiX installer upgrade code,\n which must be unique across applications and can be set explicitly with the\n [`bundle > windows > wix > upgradeCode`](WixConfig::upgrade_code) setting.", + "description": "App name.\n\n This is the name your app is known by on the user's system, so it must be changed from the\n default before publishing. Besides naming the generated bundles, it is written into platform\n metadata and install paths that are expected to be unique to your application.\n\n ## Platform-specific\n\n - **macOS**: Names the `.app` bundle and the `.dmg`, and sets the bundle's\n `CFBundleDisplayName` and `CFBundleName` properties. `CFBundleName` can be overridden with\n [`bundle > macOS > bundleName`](MacConfig::bundle_name).\n - **Linux**: Kebab-cased for the Debian and RPM package names, used as the `Name` entry of\n the desktop file and as the resource directory name under `/usr/lib`.\n - **Windows**: Names the installers, the installation directory, the Start Menu folder and\n the `HKCU\\Software\\\\` registry key. It also derives the default\n WiX upgrade code, which must be unique across applications and can be set explicitly with\n [`bundle > windows > wix > upgradeCode`](WixConfig::upgrade_code).", "type": [ "string", "null" diff --git a/crates/tauri-schema-generator/schemas/config.schema.json b/crates/tauri-schema-generator/schemas/config.schema.json index ae590eb1c409..8878f5f19e24 100644 --- a/crates/tauri-schema-generator/schemas/config.schema.json +++ b/crates/tauri-schema-generator/schemas/config.schema.json @@ -16,7 +16,7 @@ ] }, "productName": { - "description": "App name.\n\n Make sure to change this from the default `tauri-app` before publishing your app.\n On Windows it is used to derive the default WiX installer upgrade code,\n which must be unique across applications and can be set explicitly with the\n [`bundle > windows > wix > upgradeCode`](WixConfig::upgrade_code) setting.", + "description": "App name.\n\n This is the name your app is known by on the user's system, so it must be changed from the\n default before publishing. Besides naming the generated bundles, it is written into platform\n metadata and install paths that are expected to be unique to your application.\n\n ## Platform-specific\n\n - **macOS**: Names the `.app` bundle and the `.dmg`, and sets the bundle's\n `CFBundleDisplayName` and `CFBundleName` properties. `CFBundleName` can be overridden with\n [`bundle > macOS > bundleName`](MacConfig::bundle_name).\n - **Linux**: Kebab-cased for the Debian and RPM package names, used as the `Name` entry of\n the desktop file and as the resource directory name under `/usr/lib`.\n - **Windows**: Names the installers, the installation directory, the Start Menu folder and\n the `HKCU\\Software\\\\` registry key. It also derives the default\n WiX upgrade code, which must be unique across applications and can be set explicitly with\n [`bundle > windows > wix > upgradeCode`](WixConfig::upgrade_code).", "type": [ "string", "null" diff --git a/crates/tauri-utils/src/config.rs b/crates/tauri-utils/src/config.rs index 17763fbc01c0..de53d928cea1 100644 --- a/crates/tauri-utils/src/config.rs +++ b/crates/tauri-utils/src/config.rs @@ -3745,10 +3745,21 @@ pub struct Config { pub schema: Option, /// App name. /// - /// Make sure to change this from the default `tauri-app` before publishing your app. - /// On Windows it is used to derive the default WiX installer upgrade code, - /// which must be unique across applications and can be set explicitly with the - /// [`bundle > windows > wix > upgradeCode`](WixConfig::upgrade_code) setting. + /// This is the name your app is known by on the user's system, so it must be changed from the + /// default before publishing. Besides naming the generated bundles, it is written into platform + /// metadata and install paths that are expected to be unique to your application. + /// + /// ## Platform-specific + /// + /// - **macOS**: Names the `.app` bundle and the `.dmg`, and sets the bundle's + /// `CFBundleDisplayName` and `CFBundleName` properties. `CFBundleName` can be overridden with + /// [`bundle > macOS > bundleName`](MacConfig::bundle_name). + /// - **Linux**: Kebab-cased for the Debian and RPM package names, used as the `Name` entry of + /// the desktop file and as the resource directory name under `/usr/lib`. + /// - **Windows**: Names the installers, the installation directory, the Start Menu folder and + /// the `HKCU\Software\\` registry key. It also derives the default + /// WiX upgrade code, which must be unique across applications and can be set explicitly with + /// [`bundle > windows > wix > upgradeCode`](WixConfig::upgrade_code). #[serde(alias = "product-name")] #[cfg_attr(feature = "schema", validate(regex(pattern = "^[^/\\:*?\"<>|]+$")))] pub product_name: Option, From c1c0835aed5969ed0ab07fad72aceaa208ca1c28 Mon Sep 17 00:00:00 2001 From: libokai Date: Wed, 19 Aug 2026 13:37:41 +0800 Subject: [PATCH 3/4] fix(cli): broaden the default productName warning The warning and the change file described only the WiX upgrade code, which is one of several things productName controls. Also bump @tauri-apps/cli alongside tauri-cli, matching the other change files. --- .changes/default-product-name-warning.md | 3 ++- crates/tauri-cli/src/build.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.changes/default-product-name-warning.md b/.changes/default-product-name-warning.md index 50d55dc70597..eb4bca149e8a 100644 --- a/.changes/default-product-name-warning.md +++ b/.changes/default-product-name-warning.md @@ -1,6 +1,7 @@ --- "tauri-cli": patch:enhance +"@tauri-apps/cli": patch:enhance "tauri-utils": patch:enhance --- -`tauri build` now warns when `productName` is still set to the default `tauri-app`, since it is used to derive the default Windows installer (WiX) upgrade code, which must be unique across applications. The config documentation for `productName` and `identifier` was updated accordingly. +`tauri build` now warns when `productName` is still set to the default `tauri-app`, since it names the generated bundles and is written into install paths and metadata that are expected to be unique to your application. The config documentation for `productName` now lists what the field controls on each platform, and `identifier`'s documentation notes that the default value is rejected. diff --git a/crates/tauri-cli/src/build.rs b/crates/tauri-cli/src/build.rs index 8ca1ebd224aa..d07351440e9a 100644 --- a/crates/tauri-cli/src/build.rs +++ b/crates/tauri-cli/src/build.rs @@ -195,7 +195,7 @@ pub fn setup( if config.product_name.as_deref() == Some("tauri-app") { log::warn!( - "The `productName` is still set to the default value `tauri-app`. You should change it before publishing your app since it is used to derive the default Windows installer (WiX) upgrade code, which must be unique across applications." + "The `productName` is still set to the default value `tauri-app`. You should change it before publishing your app since it names the generated bundles and is written into install paths and platform metadata that are expected to be unique to your application, like the Windows installer upgrade code." ); } From f7fcd2b085cf0f3baed5ee7e177d11a3c4078976 Mon Sep 17 00:00:00 2001 From: Tony <68118705+Legend-Master@users.noreply.github.com> Date: Wed, 19 Aug 2026 16:10:23 +0800 Subject: [PATCH 4/4] Update crates/tauri-cli/src/build.rs --- crates/tauri-cli/src/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/tauri-cli/src/build.rs b/crates/tauri-cli/src/build.rs index d07351440e9a..e1c62171ad3a 100644 --- a/crates/tauri-cli/src/build.rs +++ b/crates/tauri-cli/src/build.rs @@ -195,7 +195,7 @@ pub fn setup( if config.product_name.as_deref() == Some("tauri-app") { log::warn!( - "The `productName` is still set to the default value `tauri-app`. You should change it before publishing your app since it names the generated bundles and is written into install paths and platform metadata that are expected to be unique to your application, like the Windows installer upgrade code." + "The `productName` is still set to the default value `tauri-app`, it must be unique across applications since it is written into install paths and platform metadata that are expected to be unique to your application, like the Windows installer upgrade code." ); }