【发布时间】:2022-01-18 20:48:23
【问题描述】:
在尝试为我的 Electron 应用程序编译安装程序时,我收到以下错误:
Failed with exit code: 4294967295
System.Exception: Failed to compile WiX template, command invoked was: 'candle.exe -nologo -ext WixNetFxExtension -out
error CNDL0108 : The Product/@Version attribute's value, '!(bind.FileVersion.my-app.exe)', is not a valid version. Legal version values should look like 'x.x.x.x' where x is an integer from 0 to 65534.*
error CNDL0010 : The Product/@Version attribute was not found; it is required.
这是我的 build.js 文件:
var electronInstaller = require('electron-winstaller');
var settings = {
appDirectory: './my-app-win32-x64',
outputDirectory: './my-app-built-installers',
authors: 'Valentin Ruiz',
version: '1.0.0',
exe: './my-app.exe'
};
resultPromise = electronInstaller.createWindowsInstaller(settings);
resultPromise.then(() => {
console.log("The installers of your application were succesfully created !");
}, (e) => {
console.log(`Well, sometimes you are not so lucky: ${e.message}`)
});
package.json 的标题或名称中没有破折号
所以我将版本更改为 1.0.0.0 以适应 x.x.x.x 示例,但出现错误:
System.Exception: Your package version is currently 1.0.0.0, which is not SemVer-compatible, change this to be a SemVer version number
根据互联网,SemVer 编号是 X.Y.Z 布局,我不明白...
【问题讨论】:
标签: electron