wix - 错误 ICE18:组件的 KeyPath:“DeviceStartup”是目录:
问题描述
构建 WIX 项目时出现以下错误。
ICE18:组件的 KeyPath:“DeviceStartup”是目录:“INSTALLDIR”。目录/组件对必须列在 CreateFolders 表中。PCE1.0.1 E:\Data\PCE1\PCE1.0.1 E:\Data\PCE1\PCE1.0.1\PCE_WiX_Installer_EN.wxs 48 1 构建
下面是代码片段:
<Directory Id="INSTALLDIR" ShortName="PCE" Name="PowerChart Application">
<Component Id="DeviceStartup" Guid="{52B316C2-77EA-11E0-B16E-49D64824019B}">
<Shortcut Id="startupEXE" Directory="StartupFolder" Name="Device Status" ShortName="DeviceStat" Target="[INSTALLDIR]Display.exe" />
</Component>
错误显示在“组件”元素的位置。
为此,作为解决方法的一部分,我为“组件”元素添加了 KeyPath="yes"。这样我就解决了这个问题。
我可以采用这种解决方法吗?请建议?
解决方案
Could you just put the shortcut in the same component as the executable? There is a sample below. Do you install per-user or per-machine?
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="StartupFolder" />
<Component Id="Product.exe" Feature="Main">
<File Source="Product.exe" KeyPath="yes">
<Shortcut Id="startupEXE" Directory="StartupFolder" Name="Product" Advertise="yes" />
</File>
</Component>
</Directory>
推荐阅读
- docker - docker:从 windows 容器访问 linux-container 服务
- android - Android 材料滑块。无标签
- typescript - 如何使用 Rollup 作为捆绑器使用图像文件作为源?
- docker - 如何使用 Kubernetes on Docker for Windows 在容器上的 Windows 中挂载目录?
- excel - 查找重复项并删除整行(使用 Do While 和 If 循环)
- python - 如何在 pyspark 管道阶段处理字符串索引器和 onehot 编码器
- amazon-web-services - 如何通过+其他键之间的字符串查询DynamoDB
- java - 在java中有效地将字符串解析为具有2个浮点数的类对象
- reactjs - 如何将选择下拉列表中的第一个值设置为默认反应
- prettier - 使用 breakParent 强制换行