electron - Electron Builder Appx:包清单无效
问题描述
我试图用 Electron Builder 将我的应用程序打包为 Appx 文件,以便在 Windows 应用商店中发布它。但是我不断收到这个奇怪的错误,它说我的清单文件不可用:
MakeAppx : error: Package creation failed.
MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.
实际上,我有一个工作 AppxManifest.xml 但不能在电子生成器中使用它。我的身份变量也应该是正确的(我在其他工具中使用它并成功发布)。所以我有点卡在这里。
这是我的 package.json
{
"name": "***",
"version": "1.0.1",
"description": "Made with love <3",
"main": "index.js",
"scripts": {
"start": "electron .",
"pack": "electron-builder --dir",
"dist": "electron-builder"
},
"author": "***",
"license": "All Rights Reserved",
"dependencies": {
"knex": "^0.21.6",
"sqlite3": "^5.0.0"
},
"devDependencies": {
"electron": "^10.1.2",
"electron-builder": "^22.9.1"
},
"build": {
"productName": "***",
"appId": "***.com",
"directories": {
"buildResources": "assets"
},
"win": {
"icon": "assets/icon.ico",
"target": [
"nsis",
"appx"
]
},
"nsis": {
"oneClick": false,
"perMachine": true,
"allowToChangeInstallationDirectory": true
},
"appx": {
"identityName": "NumberPublishername.Appname",
"publisher": "CN=LongNumber",
"publisherDisplayName": "Publishername",
"applicationId": "Appname"
}
}
}
解决方案
问题是这一行Made with love <3
,<
因为 XML 无效,所以那里不允许使用该字符。可悲的是控制台没有说什么是错的。
推荐阅读
- javascript - 如何调用回调直接修复 React 类组件中的“this”?
- angular - 使用 angular-cli-ghpages 部署 Scully 静态文件夹?
- sql - 如何在 PostgreSQL 中的 jsonb 列的元素上使用 LOWER()?
- react-native - 使用 webview 发送参数 - React Native
- flutter - 访问颤振测试导致 tearDownAll
- c++ - 我无法通过它们的指针将多个类链接在一起
- java - 在两个对象上具有任何匹配的过滤流将一个对象的值设置为另一个对象的值
- certificate - 用于签署 # 的部署清单的 ClickOnce 证书或其位置不受信任
- terraform - 使用公共模块的 Terraspace
- python - Python 无法创建 NewWriteableFile (tensorflow.python.framework.errors_impl.NotFoundError: 无法创建 NewWriteableFile: )